diff options
author | Scott Lobdell <slobdell@google.com> | 2021-02-23 11:55:26 -0800 |
---|---|---|
committer | Daniel Norman <danielnorman@google.com> | 2021-03-01 15:24:51 -0800 |
commit | 24818fca475a6726f5ef0cae42149615079af6e9 (patch) | |
tree | 1a3163ac7ce01c335d8d1c05cacddf47c0a30bfd /libs/androidfw/ApkAssets.cpp | |
parent | 8deb6bda58c7ecd95285f4dc934269e0c98c989a (diff) | |
parent | 0f50c486e59546c32acf3f2cdf6667897600de5c (diff) |
Merge SP1A.210222.001
Change-Id: If3509f3a660e820f4c8c0b29e007faa868e1f089
Diffstat (limited to 'libs/androidfw/ApkAssets.cpp')
-rwxr-xr-x | libs/androidfw/ApkAssets.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libs/androidfw/ApkAssets.cpp b/libs/androidfw/ApkAssets.cpp index ca5981c0dd5c..9c743cea592a 100755 --- a/libs/androidfw/ApkAssets.cpp +++ b/libs/androidfw/ApkAssets.cpp @@ -83,8 +83,16 @@ std::unique_ptr<ApkAssets> ApkAssets::LoadOverlay(const std::string& idmap_path, return {}; } + std::unique_ptr<AssetsProvider> overlay_assets; const std::string overlay_path(loaded_idmap->OverlayApkPath()); - auto overlay_assets = ZipAssetsProvider::Create(overlay_path); + if (IsFabricatedOverlay(overlay_path)) { + // Fabricated overlays do not contain resource definitions. All of the overlay resource values + // are defined inline in the idmap. + overlay_assets = EmptyAssetsProvider::Create(); + } else { + // The overlay should be an APK. + overlay_assets = ZipAssetsProvider::Create(overlay_path); + } if (overlay_assets == nullptr) { return {}; } |