From 84f6a8d613cef3227afa508c77221959dcf2f2d7 Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Fri, 12 Feb 2010 17:53:35 -0500 Subject: Don't make label textures if we don't need them. --- src/com/android/launcher2/IconCache.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/com/android/launcher2/IconCache.java b/src/com/android/launcher2/IconCache.java index 847cab72e..855d91431 100644 --- a/src/com/android/launcher2/IconCache.java +++ b/src/com/android/launcher2/IconCache.java @@ -89,6 +89,9 @@ public class IconCache { public void getTitleAndIcon(ApplicationInfo application, ResolveInfo info) { synchronized (mCache) { CacheEntry entry = cacheLocked(application.componentName, info); + if (entry.titleBitmap == null) { + entry.titleBitmap = mBubble.createTextBitmap(entry.title.toString()); + } application.title = entry.title; application.titleBitmap = entry.titleBitmap; @@ -122,15 +125,14 @@ public class IconCache { if (entry == null) { entry = new CacheEntry(); + mCache.put(componentName, entry); + entry.title = info.loadLabel(mPackageManager).toString(); if (entry.title == null) { entry.title = info.activityInfo.name; } - entry.titleBitmap = mBubble.createTextBitmap(entry.title.toString()); entry.icon = Utilities.createIconBitmap( info.activityInfo.loadIcon(mPackageManager), mContext); - - mCache.put(componentName, entry); } return entry; } -- cgit v1.2.3