diff options
| author | 2017-11-29 13:24:29 -0800 | |
|---|---|---|
| committer | 2017-12-05 00:29:38 +0000 | |
| commit | 498f6053dad29d715dd532f5272df12dabccf8c8 (patch) | |
| tree | b22dbd7d8e182fce137291b348645c7f9195255b /libs/androidfw/AssetManager2.cpp | |
| parent | 36f46a87317be9c568649c423011b37e18698013 (diff) | |
libandroidfw: Remove pre-verification
This added more up-front cost to loading an APK and didn't provide
a significant benefit to resource retrieval.
Test: make libandroidfw_tests
Change-Id: Idbf993abc433fa8c8950d106c66469b310b66f7f
Diffstat (limited to 'libs/androidfw/AssetManager2.cpp')
| -rw-r--r-- | libs/androidfw/AssetManager2.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libs/androidfw/AssetManager2.cpp b/libs/androidfw/AssetManager2.cpp index 94a05b2f90e9..415d3e36adf9 100644 --- a/libs/androidfw/AssetManager2.cpp +++ b/libs/androidfw/AssetManager2.cpp @@ -299,10 +299,9 @@ ApkAssetsCookie AssetManager2::FindEntry(uint32_t resid, uint16_t density_overri const PackageGroup& package_group = package_groups_[idx]; const size_t package_count = package_group.packages_.size(); + FindEntryResult current_entry; for (size_t i = 0; i < package_count; i++) { const LoadedPackage* loaded_package = package_group.packages_[i]; - - FindEntryResult current_entry; if (!loaded_package->FindEntry(type_idx, entry_id, *desired_config, ¤t_entry)) { continue; } @@ -394,7 +393,7 @@ ApkAssetsCookie AssetManager2::GetResource(uint32_t resid, bool may_be_bag, return kInvalidCookie; } - if (dtohl(entry.entry->flags) & ResTable_entry::FLAG_COMPLEX) { + if (dtohs(entry.entry->flags) & ResTable_entry::FLAG_COMPLEX) { if (!may_be_bag) { LOG(ERROR) << base::StringPrintf("Resource %08x is a complex map type.", resid); return kInvalidCookie; |