summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Donald Chai <dchai@google.com> 2017-10-24 23:27:27 +0000
committer android-build-merger <android-build-merger@google.com> 2017-10-24 23:27:27 +0000
commitec4dbd4d401b1c9a3b0a9ca24cfa98e9800ccb95 (patch)
treec41e524f1a9654546ad061dada4075e3c1556181
parentd303f80780be4eedc0c1b6d12a7de7a35481d4ca (diff)
parentd476e2902f4c96578b59a7c7d2853a1acc2b3973 (diff)
Merge "AAPT: treat "-I" with lower precedence than main APK for dumping." into oc-mr1-dev
am: d476e2902f Change-Id: I3ee9ce17439f2a4378c890b954c57a7049fbe036
-rw-r--r--tools/aapt/Command.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp
index 5e8580255197..cb87737c6868 100644
--- a/tools/aapt/Command.cpp
+++ b/tools/aapt/Command.cpp
@@ -739,12 +739,8 @@ int doDump(Bundle* bundle)
AssetManager assets;
int32_t assetsCookie;
- if (!assets.addAssetPath(String8(filename), &assetsCookie)) {
- fprintf(stderr, "ERROR: dump failed because assets could not be loaded\n");
- return 1;
- }
- // Now add any dependencies passed in.
+ // Add any dependencies passed in.
for (size_t i = 0; i < bundle->getPackageIncludes().size(); i++) {
const String8& assetPath = bundle->getPackageIncludes()[i];
if (!assets.addAssetPath(assetPath, NULL)) {
@@ -753,6 +749,11 @@ int doDump(Bundle* bundle)
}
}
+ if (!assets.addAssetPath(String8(filename), &assetsCookie)) {
+ fprintf(stderr, "ERROR: dump failed because assets could not be loaded\n");
+ return 1;
+ }
+
// Make a dummy config for retrieving resources... we need to supply
// non-default values for some configs so that we can retrieve resources
// in the app that don't have a default. The most important of these is