summaryrefslogtreecommitdiff
path: root/tools/aapt/Command.cpp
diff options
context:
space:
mode:
author Adam Lesinski <adamlesinski@google.com> 2017-05-10 15:42:22 -0700
committer Adam Lesinski <adamlesinski@google.com> 2017-05-10 15:42:22 -0700
commit57fe48389f845709db23234088b97f4e30307ff4 (patch)
tree0ae774b1defd42793ae936a8e25eeb12064a6ee5 /tools/aapt/Command.cpp
parentf93dc8b6504200d0b6d502d924a70a743f9b1411 (diff)
AAPT: Allow including dependencies in dump command
Feature splits depend on their base. The dump badging command does resource resolution, and needs to be able to find resources located in the base APK of a feature split. Bug: 38038608 Test: manual Change-Id: I8c22f0083c46a853a3a56a4049715409ac2723fe
Diffstat (limited to 'tools/aapt/Command.cpp')
-rw-r--r--tools/aapt/Command.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp
index 15648bdd1b3b..ba731801e507 100644
--- a/tools/aapt/Command.cpp
+++ b/tools/aapt/Command.cpp
@@ -762,6 +762,15 @@ int doDump(Bundle* bundle)
return 1;
}
+ // Now 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)) {
+ fprintf(stderr, "ERROR: included asset path %s could not be loaded\n", assetPath.string());
+ 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