]> git.saurik.com Git - android/aapt.git/commitdiff
Avoid pre-processing images when they won't be used
authorAnthony Newnam <anthony.newnam@garmin.com>
Wed, 1 Sep 2010 17:06:04 +0000 (12:06 -0500)
committerGarmin Android technology group <android@garmin.com>
Fri, 3 Sep 2010 20:17:09 +0000 (15:17 -0500)
Change-Id: Iffa31228ca95a2e29ccc0aa81bda0fc66922d577

Resource.cpp

index b00e2765f3b9b3495713948bcfcc5af5bc7c32ff..7ffd43bcf589107ffaf849d6a823184a470364c6 100644 (file)
@@ -835,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) {