summaryrefslogtreecommitdiff
path: root/tools/aapt
diff options
context:
space:
mode:
authorRyan Mitchell <rtmitchell@google.com>2019-07-01 09:48:23 -0700
committerRyan Mitchell <rtmitchell@google.com>2019-10-17 13:09:33 -0700
commit8a891d86abdf35b6703785fb3368b39510e91357 (patch)
treea58684aba049e9345ad0c1cf23f2bc4593a9892c /tools/aapt
parente753ffef5499bc0150827a06d44b50abe78b36dd (diff)
Allow for RRO internal referencing
This change allows RROs to reference their own internal resources as expected. Overlays are loaded as shared libraries so they can have their own resource id space that does not conflict with the resource id space of the target or other overlays. References to overlay resources that override target resources now appear as references to the target resources. Overlay values that are inlined into the xml file specified using android:overlayResources are now able to be used at runtime. See go/rro-references for more information. Bug: 135943783 Test: idmap2_tests Test: libandroidfw_tests Change-Id: Ie349c56d7fd3f7d94b7d595ed6d01dc6b59b6178
Diffstat (limited to 'tools/aapt')
-rw-r--r--tools/aapt/Command.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp
index 05375b0cb871..21386b88ce2c 100644
--- a/tools/aapt/Command.cpp
+++ b/tools/aapt/Command.cpp
@@ -787,7 +787,9 @@ int doDump(Bundle* bundle)
// The dynamicRefTable can be null if there are no resources for this asset cookie.
// This fine.
- const DynamicRefTable* dynamicRefTable = res.getDynamicRefTableForCookie(assetsCookie);
+ auto noop_destructor = [](const DynamicRefTable* /*ref_table */) { };
+ auto dynamicRefTable = std::shared_ptr<const DynamicRefTable>(
+ res.getDynamicRefTableForCookie(assetsCookie), noop_destructor);
Asset* asset = NULL;