diff options
author | 2016-08-11 17:28:07 +0000 | |
---|---|---|
committer | 2016-08-11 17:28:07 +0000 | |
commit | c97c9dbd962326bdb39b126ed2d84ed861e803c2 (patch) | |
tree | c3d981b79ff102dbdeac9c4d6155d01c3c57d9a3 /tools/aapt/AaptAssets.cpp | |
parent | bda5769701a30f6922f423b52b38066544b08d8e (diff) | |
parent | d0197ac3402e5d85324db4230407115ddec8011a (diff) |
Merge "Do not stack allocate RefBase object in AaptAssets::filter"
am: d0197ac340
Change-Id: I077f9c190025d688af17d1a840b841cbdc4e003d
Diffstat (limited to 'tools/aapt/AaptAssets.cpp')
-rw-r--r-- | tools/aapt/AaptAssets.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/aapt/AaptAssets.cpp b/tools/aapt/AaptAssets.cpp index c1cfd0b5f1e7..3c3edda85e4f 100644 --- a/tools/aapt/AaptAssets.cpp +++ b/tools/aapt/AaptAssets.cpp @@ -1309,8 +1309,8 @@ bail: status_t AaptAssets::filter(Bundle* bundle) { - WeakResourceFilter reqFilter; - status_t err = reqFilter.parse(bundle->getConfigurations()); + sp<WeakResourceFilter> reqFilter(new WeakResourceFilter()); + status_t err = reqFilter->parse(bundle->getConfigurations()); if (err != NO_ERROR) { return err; } @@ -1326,12 +1326,12 @@ status_t AaptAssets::filter(Bundle* bundle) preferredDensity = preferredConfig.density; } - if (reqFilter.isEmpty() && preferredDensity == 0) { + if (reqFilter->isEmpty() && preferredDensity == 0) { return NO_ERROR; } if (bundle->getVerbose()) { - if (!reqFilter.isEmpty()) { + if (!reqFilter->isEmpty()) { printf("Applying required filter: %s\n", bundle->getConfigurations().string()); } @@ -1383,7 +1383,7 @@ status_t AaptAssets::filter(Bundle* bundle) continue; } const ResTable_config& config(file->getGroupEntry().toParams()); - if (!reqFilter.match(config)) { + if (!reqFilter->match(config)) { if (bundle->getVerbose()) { printf("Pruning unneeded resource: %s\n", file->getPrintableSource().string()); |