summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoe Onorato <joeo@google.com>2010-02-12 14:55:25 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-02-12 14:55:25 -0800
commit6a35157a2bb7dceaa1d34555de5776161290d325 (patch)
treec670723d33eeb13234adf7fbe84b7ebae6dc7af0 /src
parentc0c4fe39166b3ed8b9bb19129a890922d93f7a92 (diff)
parent84f6a8d613cef3227afa508c77221959dcf2f2d7 (diff)
downloadandroid_packages_apps_Trebuchet-6a35157a2bb7dceaa1d34555de5776161290d325.tar.gz
android_packages_apps_Trebuchet-6a35157a2bb7dceaa1d34555de5776161290d325.tar.bz2
android_packages_apps_Trebuchet-6a35157a2bb7dceaa1d34555de5776161290d325.zip
Merge "Don't make label textures if we don't need them."
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher2/IconCache.java8
1 files changed, 5 insertions, 3 deletions
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;
}