Merge "Avoid pre-processing images when they won't be used" into gingerbread
diff --git a/tools/aapt/Resource.cpp b/tools/aapt/Resource.cpp
index 9c5fcda2..c8ba904 100644
--- a/tools/aapt/Resource.cpp
+++ b/tools/aapt/Resource.cpp
@@ -835,7 +835,9 @@
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) {