summaryrefslogtreecommitdiff
path: root/libs/androidfw/tests/AssetManager2_test.cpp
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 /libs/androidfw/tests/AssetManager2_test.cpp
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 'libs/androidfw/tests/AssetManager2_test.cpp')
-rw-r--r--libs/androidfw/tests/AssetManager2_test.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/androidfw/tests/AssetManager2_test.cpp b/libs/androidfw/tests/AssetManager2_test.cpp
index 15910241518d..b3190be8caf1 100644
--- a/libs/androidfw/tests/AssetManager2_test.cpp
+++ b/libs/androidfw/tests/AssetManager2_test.cpp
@@ -718,15 +718,17 @@ TEST_F(AssetManager2Test, GetOverlayablesToString) {
const auto map = assetmanager.GetOverlayableMapForPackage(0x7f);
ASSERT_NE(nullptr, map);
- ASSERT_EQ(2, map->size());
+ ASSERT_EQ(3, map->size());
ASSERT_EQ(map->at("OverlayableResources1"), "overlay://theme");
ASSERT_EQ(map->at("OverlayableResources2"), "overlay://com.android.overlayable");
+ ASSERT_EQ(map->at("OverlayableResources3"), "");
std::string api;
ASSERT_TRUE(assetmanager.GetOverlayablesToString("com.android.overlayable", &api));
ASSERT_EQ(api.find("not_overlayable"), std::string::npos);
ASSERT_NE(api.find("resource='com.android.overlayable:string/overlayable2' overlayable='OverlayableResources1' actor='overlay://theme' policy='0x0000000a'\n"),
std::string::npos);
+
}
} // namespace android