diff options
| author | 2020-12-03 15:41:42 -0800 | |
|---|---|---|
| committer | 2021-01-06 16:19:50 -0800 | |
| commit | 0699f1de6a684644b2debf82d55dfbcbc9387679 (patch) | |
| tree | 916a23f66e2121c3de601af478187e52687de57f /libs/androidfw/AssetManager2.cpp | |
| parent | 7e8ae00d9c855d15d6bdddcadd0a5563bb4e0b64 (diff) | |
Remove idmap path 256 length limit
Overlay and target package paths can be longer than 256 characters.
Currently, the idmap will fail to be generated if either path
is longer than 256 characters.
This change removes the 256 character limit and makes parsing variable
length strings easier in libandroidfw.
Bug: 174676094
Test: idmap2_tests && libandroidfw_tests
Change-Id: Ic240cdb8700566b2ac2ade08da58bea852e4ae0c
Diffstat (limited to 'libs/androidfw/AssetManager2.cpp')
| -rw-r--r-- | libs/androidfw/AssetManager2.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/androidfw/AssetManager2.cpp b/libs/androidfw/AssetManager2.cpp index bec80a7d605e..3f0600040139 100644 --- a/libs/androidfw/AssetManager2.cpp +++ b/libs/androidfw/AssetManager2.cpp @@ -157,7 +157,8 @@ void AssetManager2::BuildDynamicRefTable() { // The target package must precede the overlay package in the apk assets paths in order // to take effect. const auto& loaded_idmap = apk_assets->GetLoadedIdmap(); - auto target_package_iter = apk_assets_package_ids.find(loaded_idmap->TargetApkPath()); + auto target_package_iter = apk_assets_package_ids.find( + std::string(loaded_idmap->TargetApkPath())); if (target_package_iter == apk_assets_package_ids.end()) { LOG(INFO) << "failed to find target package for overlay " << loaded_idmap->OverlayApkPath(); |