summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authord34d <clark@cyngn.com>2015-05-11 11:43:41 -0700
committerClark Scheff <clark@cyngn.com>2015-10-27 18:17:06 -0700
commit733da72412bb7b8cc10a9312e15f7d49caecf190 (patch)
tree20f43d0a60917ac57afe176eaf9533b498e9d23e /libs
parent7739ab7e7848c29309c691dd7e73b92671bf99a1 (diff)
downloadframeworks_base-733da72412bb7b8cc10a9312e15f7d49caecf190.zip
frameworks_base-733da72412bb7b8cc10a9312e15f7d49caecf190.tar.gz
frameworks_base-733da72412bb7b8cc10a9312e15f7d49caecf190.tar.bz2
Remove resources.apk from ZipSet when removing overlay
When a theme that is currently applied is updated, the resources.apk prior to the update remains in the AssetManager ZipSet and is still used when loading themed assets. This patch removes the resources.apk from the ZipSet so that the new one can be correctly loaded in. Change-Id: Ia0b415a3598779825090f365581d374bf51c812d REF: THEMES-639
Diffstat (limited to 'libs')
-rw-r--r--libs/androidfw/AssetManager.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/androidfw/AssetManager.cpp b/libs/androidfw/AssetManager.cpp
index f4ac254..635aa5b 100644
--- a/libs/androidfw/AssetManager.cpp
+++ b/libs/androidfw/AssetManager.cpp
@@ -1018,6 +1018,9 @@ bool AssetManager::removeOverlayPath(const String8& packageName, int32_t cookie)
return false;
}
+ const asset_path& oap = mAssetPaths.itemAt(which);
+ mZipSet.closeZip(oap.resApkPath);
+
mAssetPaths.removeAt(which);
ResTable* rt = mResources;
@@ -2291,6 +2294,10 @@ ZipFileRO* AssetManager::ZipSet::getZip(const String8& path)
return zip->getZip();
}
+void AssetManager::ZipSet::closeZip(const String8& zip) {
+ closeZip(getIndex(zip));
+}
+
Asset* AssetManager::ZipSet::getZipResourceTableAsset(const String8& path)
{
int idx = getIndex(path);