summaryrefslogtreecommitdiff
path: root/libs/androidfw/AssetManager2.cpp
diff options
context:
space:
mode:
author Ryan Mitchell <rtmitchell@google.com> 2020-04-13 14:57:19 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2020-04-13 14:57:19 +0000
commitb8a61d13c2fd447abe5ce9cd635ea3a49c08ebe9 (patch)
tree409f4650f743226a23edce1febcafd7700af4f02 /libs/androidfw/AssetManager2.cpp
parent2dc9632eb555fe4e3fe46ccf6454200025569c86 (diff)
parent192400cf334e0e8befe336861a6d214c6a88c993 (diff)
Merge "Fail install when resources.arsc is compressed" into rvc-dev
Diffstat (limited to 'libs/androidfw/AssetManager2.cpp')
-rw-r--r--libs/androidfw/AssetManager2.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/androidfw/AssetManager2.cpp b/libs/androidfw/AssetManager2.cpp
index eaf452b5fa71..b9765ea7212c 100644
--- a/libs/androidfw/AssetManager2.cpp
+++ b/libs/androidfw/AssetManager2.cpp
@@ -331,6 +331,11 @@ bool AssetManager2::GetOverlayablesToString(const android::StringPiece& package_
return true;
}
+bool AssetManager2::ContainsAllocatedTable() const {
+ return std::find_if(apk_assets_.begin(), apk_assets_.end(),
+ std::mem_fn(&ApkAssets::IsTableAllocated)) != apk_assets_.end();
+}
+
void AssetManager2::SetConfiguration(const ResTable_config& configuration) {
const int diff = configuration_.diff(configuration);
configuration_ = configuration;