From 0a226d84e1e67fc5a180d65246ed942266701fb8 Mon Sep 17 00:00:00 2001 From: Anthony Newnam Date: Wed, 1 Sep 2010 12:06:04 -0500 Subject: [PATCH] Avoid pre-processing images when they won't be used Change-Id: I24db3645c399f66dc7cc0e85909ce34b68ff829e --- tools/aapt/Resource.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/aapt/Resource.cpp b/tools/aapt/Resource.cpp index 9c5fcda2bcf0d..c8ba9048f8670 100644 --- a/tools/aapt/Resource.cpp +++ b/tools/aapt/Resource.cpp @@ -835,7 +835,9 @@ status_t buildResources(Bundle* bundle, const sp& 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) {