]> git.saurik.com Git - android/aapt.git/blobdiff - Resource.cpp
Add a --debug-mode option to aapt.
[android/aapt.git] / Resource.cpp
index bd84e236a3ec6afacb4c000a28e717850e30e0c0..9c5fcda2bcf0dd5aa3484bcfd4cffc66addad881 100644 (file)
@@ -678,6 +678,13 @@ status_t massageManifest(Bundle* bundle, sp<XMLNode> root)
                 bundle->getMaxSdkVersion());
     }
 
+    if (bundle->getDebugMode()) {
+        sp<XMLNode> application = root->getChildElement(String16(), String16("application"));
+        if (application != NULL) {
+            addTagAttribute(application, RESOURCES_ANDROID_NAMESPACE, "debuggable", "true");
+        }
+    }
+
     // Deal with manifest package name overrides
     const char* manifestPackageNameOverride = bundle->getManifestPackageNameOverride();
     if (manifestPackageNameOverride != NULL) {