Deferring testing of loaded icons against db icons, saves between 15-30% on workspace load. (5042022)

Change-Id: I016248f6779851390df1bf0a23199d0aecc032d1
This commit is contained in:
Winson Chung
2011-08-17 10:37:13 -07:00
parent c273c5814d
commit aac01e1073
2 changed files with 45 additions and 23 deletions

View File

@@ -160,13 +160,14 @@ public class IconCache {
}
}
public Bitmap getIcon(ComponentName component, ResolveInfo resolveInfo) {
public Bitmap getIcon(ComponentName component, ResolveInfo resolveInfo,
HashMap<Object, CharSequence> labelCache) {
synchronized (mCache) {
if (resolveInfo == null || component == null) {
return null;
}
CacheEntry entry = cacheLocked(component, resolveInfo, null);
CacheEntry entry = cacheLocked(component, resolveInfo, labelCache);
return entry.icon;
}
}