]> 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)
committerXavier Ducrohet <xav@android.com>
Thu, 7 Oct 2010 01:39:19 +0000 (18:39 -0700)
Change-Id: I24db3645c399f66dc7cc0e85909ce34b68ff829e

Resource.cpp

index 9c5fcda2bcf0dd5aa3484bcfd4cffc66addad881..c8ba9048f8670a0dcd723c14e7567d0341939883 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) {