Fixing issue where app icons were not updating with the package.
- 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
diff --git a/src/com/android/launcher2/AllAppsList.java b/src/com/android/launcher2/AllAppsList.java
index 11c7559..0ffab39 100644
--- a/src/com/android/launcher2/AllAppsList.java
+++ b/src/com/android/launcher2/AllAppsList.java
@@ -130,7 +130,7 @@
&& 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 @@
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 @@
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 84fed5f..2074610 100644
--- a/src/com/android/launcher2/IconCache.java
+++ b/src/com/android/launcher2/IconCache.java
@@ -160,9 +160,9 @@
/**
* 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));
}
}