Skip to content

Commit 578a57f

Browse files
Anthony NewnamGarmin Android technology group
authored andcommitted
Avoid pre-processing images when they won't be used
Change-Id: Iffa31228ca95a2e29ccc0aa81bda0fc66922d577
1 parent bd6abed commit 578a57f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/aapt/Resource.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,9 @@ status_t buildResources(Bundle* bundle, const sp<AaptAssets>& assets)
835835
bool hasErrors = false;
836836

837837
if (drawables != NULL) {
838-
err = preProcessImages(bundle, assets, drawables);
838+
if (bundle->getOutputAPKFile() != NULL) {
839+
err = preProcessImages(bundle, assets, drawables);
840+
}
839841
if (err == NO_ERROR) {
840842
err = makeFileResources(bundle, assets, &table, drawables, "drawable");
841843
if (err != NO_ERROR) {

0 commit comments

Comments
 (0)