]> git.saurik.com Git - android/aapt.git/blobdiff - Resource.cpp
Implement issue #3116702: New manifest tags for supported screen sizes
[android/aapt.git] / Resource.cpp
index 498b1937273fd2dac74e8a65846a2e0f8dfecbb9..822262eda8bed411255ff816291d0cca9fd3ccc1 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) {
@@ -828,7 +835,9 @@ status_t buildResources(Bundle* bundle, const sp<AaptAssets>& assets)
     bool hasErrors = false;
 
     if (drawables != NULL) {
-        err = preProcessImages(bundle, assets, drawables);
+        if (bundle->getOutputAPKFile() != NULL) {
+            err = preProcessImages(bundle, assets, drawables);
+        }
         if (err == NO_ERROR) {
             err = makeFileResources(bundle, assets, &table, drawables, "drawable");
             if (err != NO_ERROR) {