summaryrefslogtreecommitdiff
path: root/libs/androidfw/ApkAssets.cpp
diff options
context:
space:
mode:
authorRyan Mitchell <rtmitchell@google.com>2020-03-16 14:54:02 -0700
committerRyan Mitchell <rtmitchell@google.com>2020-03-19 18:33:55 -0700
commit39cacf2de79e201ac77e7e1100a7b0ba29abb8f5 (patch)
tree2376580388c7e6c2b7e75b2cd4e6fe68c77d8cb5 /libs/androidfw/ApkAssets.cpp
parent4ea1e4288985508e3e0f21febe4da242c86a7dd1 (diff)
Allow using loaders on non-RM Resources instances
Currently there is a limitation where ResourcesLoaders cannot be used on Resources object not created through ResourcesManager. This change creates an update handler for Resources objects that are not registered with ResourcesManager. The handler changes the loaders on the asset manager owned by the Resources instance. Bug: 151666644 Test: atest ResourceLoaderValuesTest Change-Id: I5a89f686386bdb088dc964014e7becc0c2b4770f
Diffstat (limited to 'libs/androidfw/ApkAssets.cpp')
-rw-r--r--libs/androidfw/ApkAssets.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/androidfw/ApkAssets.cpp b/libs/androidfw/ApkAssets.cpp
index 202651dc86d5..918e7af12d31 100644
--- a/libs/androidfw/ApkAssets.cpp
+++ b/libs/androidfw/ApkAssets.cpp
@@ -471,7 +471,7 @@ std::unique_ptr<const ApkAssets> ApkAssets::LoadImpl(
bool resources_asset_exists = false;
auto resources_asset_ = assets->Open(kResourcesArsc, Asset::AccessMode::ACCESS_BUFFER,
&resources_asset_exists);
-
+
assets = MultiAssetsProvider::Create(std::move(override_assets), std::move(assets));
// Wrap the handle in a unique_ptr so it gets automatically closed.