]> git.saurik.com Git - android/aapt.git/blobdiff - Resource.cpp
Add a --debug-mode option to aapt.
[android/aapt.git] / Resource.cpp
index cafd635c97d34ab6e316ec98665f2ff0baea541e..b00e2765f3b9b3495713948bcfcc5af5bc7c32ff 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) {