summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWinson <winsonc@google.com>2015-08-07 14:48:20 -0700
committerWinson <winsonc@google.com>2015-08-07 14:48:20 -0700
commit53f6b7b340534e043fc98dc6a49fd9839d01c12a (patch)
treee4b57c1e85e790c8a8a89deda3b24fa8e42a6bcf
parenta7866cd9ff40c072279b3f37f67d3c8d6aecfb54 (diff)
downloadLauncher2-53f6b7b340534e043fc98dc6a49fd9839d01c12a.tar.gz
- This was due to the fact that the cache keys are now CacheKeys instead of ComponentNames, which we were still trying to remove. This is a serious issue because it means no app can update their icon while Launcher2 is running. Bug: 23030496 Change-Id: I4a59ffe32b8fb2de11a64c173284b4cbf7e35222
-rw-r--r--src/com/android/launcher2/AllAppsList.java6
-rw-r--r--src/com/android/launcher2/IconCache.java4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/com/android/launcher2/AllAppsList.java b/src/com/android/launcher2/AllAppsList.java
index 11c75598..0ffab391 100644
--- a/src/com/android/launcher2/AllAppsList.java
+++ b/src/com/android/launcher2/AllAppsList.java
@@ -130,7 +130,7 @@ class AllAppsList {
&& packageName.equals(component.getPackageName())) {
if (!findActivity(matches, component, user)) {
removed.add(applicationInfo);
- mIconCache.remove(component);
+ mIconCache.remove(component, user);
data.remove(i);
}
}
@@ -149,7 +149,7 @@ class AllAppsList {
add(new ApplicationInfo(info, user,
mIconCache, null));
} else {
- mIconCache.remove(applicationInfo.componentName);
+ mIconCache.remove(applicationInfo.componentName, user);
mIconCache.getTitleAndIcon(applicationInfo, info, null);
modified.add(applicationInfo);
}
@@ -162,7 +162,7 @@ class AllAppsList {
if (user.equals(applicationInfo.user)
&& packageName.equals(component.getPackageName())) {
removed.add(applicationInfo);
- mIconCache.remove(component);
+ mIconCache.remove(component, user);
data.remove(i);
}
}
diff --git a/src/com/android/launcher2/IconCache.java b/src/com/android/launcher2/IconCache.java
index 84fed5f3..2074610b 100644
--- a/src/com/android/launcher2/IconCache.java
+++ b/src/com/android/launcher2/IconCache.java
@@ -160,9 +160,9 @@ public class IconCache {
/**
* Remove any records for the supplied ComponentName.
*/
- public void remove(ComponentName componentName) {
+ public void remove(ComponentName componentName, UserHandle user) {
synchronized (mCache) {
- mCache.remove(componentName);
+ mCache.remove(new CacheKey(componentName, user));
}
}