summaryrefslogtreecommitdiff
path: root/libs/androidfw/AssetManager2.cpp
diff options
context:
space:
mode:
author Ryan Mitchell <rtmitchell@google.com> 2020-11-20 20:28:56 +0000
committer Ryan Mitchell <rtmitchell@google.com> 2020-11-20 20:28:56 +0000
commitf2fd0cacad7a754b20aef1a917771d4962e83e28 (patch)
treef14cc71770e13b469b9a92eee245813415f62505 /libs/androidfw/AssetManager2.cpp
parentb5cd4cc2d96390eaeb509051010b02bfb55ad7d5 (diff)
Revert^3 "Do not cache bag parent stack until requested"
This reverts commit b5cd4cc2d96390eaeb509051010b02bfb55ad7d5. Reason for revert: b/173742005 Change-Id: I4bc71de39269f2f37101f94bf0c3b3a5158e7e9d
Diffstat (limited to 'libs/androidfw/AssetManager2.cpp')
-rw-r--r--libs/androidfw/AssetManager2.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/androidfw/AssetManager2.cpp b/libs/androidfw/AssetManager2.cpp
index 8c2a632b9fd7..a545b3d5e134 100644
--- a/libs/androidfw/AssetManager2.cpp
+++ b/libs/androidfw/AssetManager2.cpp
@@ -1041,7 +1041,9 @@ base::expected<const ResolvedBag*, NullOrIOError> AssetManager2::ResolveBag(
base::expected<const ResolvedBag*, NullOrIOError> AssetManager2::GetBag(uint32_t resid) const {
std::vector<uint32_t> found_resids;
- return GetBag(resid, found_resids);
+ const auto bag = GetBag(resid, found_resids);
+ cached_bag_resid_stacks_.emplace(resid, found_resids);
+ return bag;
}
base::expected<const ResolvedBag*, NullOrIOError> AssetManager2::GetBag(