diff options
author | 2020-10-05 14:29:43 -0700 | |
---|---|---|
committer | 2020-11-12 08:13:48 -0800 | |
commit | 5602dc9374934a42964e0f57faa3c0aad43003e1 (patch) | |
tree | e5db5029dd1583bca72a43c1a34f91473ca881a4 /libs/androidfw/AssetManager2.cpp | |
parent | 87e89546b66da6d5098b46ff9b868ef82a753932 (diff) |
Do not cache bag parent stack until requested
Bag parent stacks are used when inspecting/debugging layouts. Since
they are not needed at runtime when running applications normally,
do not cache bag the parent stack when calling AssetManager::GetBag.
Bug: none
Test: libandroidfw_tests
Change-Id: I29ccdc8ed30d4f2d11ee51ef58f6e459ca6c1f6a
Diffstat (limited to 'libs/androidfw/AssetManager2.cpp')
-rw-r--r-- | libs/androidfw/AssetManager2.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libs/androidfw/AssetManager2.cpp b/libs/androidfw/AssetManager2.cpp index d349628c2ab4..c49dc28124b2 100644 --- a/libs/androidfw/AssetManager2.cpp +++ b/libs/androidfw/AssetManager2.cpp @@ -1036,9 +1036,7 @@ base::expected<const ResolvedBag*, NullOrIOError> AssetManager2::ResolveBag( base::expected<const ResolvedBag*, NullOrIOError> AssetManager2::GetBag(uint32_t resid) const { std::vector<uint32_t> found_resids; - const auto bag = GetBag(resid, found_resids); - cached_bag_resid_stacks_.emplace(resid, found_resids); - return bag; + return GetBag(resid, found_resids); } base::expected<const ResolvedBag*, NullOrIOError> AssetManager2::GetBag( |