From a5bc9585b2bd09868fb6e0339dd5b8e288303b7e Mon Sep 17 00:00:00 2001 From: Yurii Zubrytskyi Date: Wed, 30 Nov 2022 23:53:59 -0800 Subject: [res] Refactor AssetManager + Providers - More moves where possible - Better interface for PathOrDebugName creation - function_ref as a callback - Get rid of some obsolete Util.h code - Shut up the logging in host mode, and ignore all calls Bug: 237583012 Test: build + boot + UTs Change-Id: Ia71fc1c83f17ab5ce3cac1179f74534f7ad2a3cb --- libs/androidfw/AssetManager2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libs/androidfw/AssetManager2.cpp') diff --git a/libs/androidfw/AssetManager2.cpp b/libs/androidfw/AssetManager2.cpp index cc7e8714c0ac..68f5e4a88c7e 100644 --- a/libs/androidfw/AssetManager2.cpp +++ b/libs/androidfw/AssetManager2.cpp @@ -1562,11 +1562,11 @@ base::expected Theme::SetTo(const Theme& source) { std::unordered_map src_asset_cookie_id_map; // Determine which ApkAssets are loaded in both theme AssetManagers. - const auto src_assets = source.asset_manager_->GetApkAssets(); + const auto& src_assets = source.asset_manager_->GetApkAssets(); for (size_t i = 0; i < src_assets.size(); i++) { const ApkAssets* src_asset = src_assets[i]; - const auto dest_assets = asset_manager_->GetApkAssets(); + const auto& dest_assets = asset_manager_->GetApkAssets(); for (size_t j = 0; j < dest_assets.size(); j++) { const ApkAssets* dest_asset = dest_assets[j]; if (src_asset != dest_asset) { -- cgit v1.2.3-59-g8ed1b