summaryrefslogtreecommitdiffstats
path: root/libs/utils/AssetManager.cpp
diff options
context:
space:
mode:
authorJosh Guilfoyle <Josh.Guilfoyle@T-Mobile.com>2011-01-20 17:33:16 -0800
committerJosh Guilfoyle <jasta00@gmail.com>2011-01-20 18:19:21 -0800
commit7d8b1bbb118cdb71c16c97dbc73390d9351c238c (patch)
tree6ceba7e042743936776989ef2a5502341731c32e /libs/utils/AssetManager.cpp
parenta6d290691188c118058ee6192565751481eb3508 (diff)
downloadframeworks_base-7d8b1bbb118cdb71c16c97dbc73390d9351c238c.zip
frameworks_base-7d8b1bbb118cdb71c16c97dbc73390d9351c238c.tar.gz
frameworks_base-7d8b1bbb118cdb71c16c97dbc73390d9351c238c.tar.bz2
Fixed a regression causing theme switch to fail.
This would only occur when switching from one theme APK to another, which apparently was not tested on the experimental branch (??). The bug would not repro if switching between system default and a theme APK. Change-Id: I9fc0b5c50c1dff4a0b2d548980977faaa0a51167
Diffstat (limited to 'libs/utils/AssetManager.cpp')
-rw-r--r--libs/utils/AssetManager.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/utils/AssetManager.cpp b/libs/utils/AssetManager.cpp
index 4513a06..b34c147 100644
--- a/libs/utils/AssetManager.cpp
+++ b/libs/utils/AssetManager.cpp
@@ -1843,6 +1843,13 @@ bool AssetManager::removeAssetPath(const String8 &packageName, void* cookie)
{
AutoMutex _l(mLock);
+ const size_t which = ((size_t)cookie)-1;
+ if (which >= mAssetPaths.size()) {
+ return false;
+ }
+
+ mAssetPaths.removeAt(which);
+
ResTable* rt = mResources;
if (rt == NULL) {
LOGV("ResTable must not be NULL");