]> git.saurik.com Git - android/aapt.git/blobdiff - Resource.cpp
am b4649ec7: am 23827557: Merge "Add a --debug-mode option to aapt." into gingerbread
[android/aapt.git] / Resource.cpp
index 498b1937273fd2dac74e8a65846a2e0f8dfecbb9..01728a17477e1752280acf66ad6ebc613d2fcc5d 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) {