diff options
author | Winson Chung <winsonc@google.com> | 2015-05-08 17:00:10 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2015-05-08 22:22:39 -0700 |
commit | 82b016cb56540fe26213e817dd0dd668099c8e20 (patch) | |
tree | 528066331689070902b505306abaecbbfbf648d0 /src/com/android/launcher3/IconCache.java | |
parent | 99d96ba6c8e3258f7d99a33d49da2aeb0da5d862 (diff) | |
download | android_packages_apps_Trebuchet-82b016cb56540fe26213e817dd0dd668099c8e20.tar.gz android_packages_apps_Trebuchet-82b016cb56540fe26213e817dd0dd668099c8e20.tar.bz2 android_packages_apps_Trebuchet-82b016cb56540fe26213e817dd0dd668099c8e20.zip |
Trim all whitespace from titles and labels.
Bug: 20953160
Change-Id: I1610df5e445a4139522226f68fa6439926bc70c6
Diffstat (limited to 'src/com/android/launcher3/IconCache.java')
-rw-r--r-- | src/com/android/launcher3/IconCache.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/com/android/launcher3/IconCache.java b/src/com/android/launcher3/IconCache.java index 6c2aa397d..0596fbe16 100644 --- a/src/com/android/launcher3/IconCache.java +++ b/src/com/android/launcher3/IconCache.java @@ -400,7 +400,7 @@ public class IconCache { UserHandleCompat user = info == null ? application.user : info.getUser(); CacheEntry entry = cacheLocked(application.componentName, info, user, false, useLowResIcon); - application.title = entry.title; + application.title = Utilities.trim(entry.title); application.iconBitmap = getNonNullIcon(entry, user); application.contentDescription = entry.contentDescription; application.usingLowResIcon = entry.isLowResIcon; @@ -413,7 +413,7 @@ public class IconCache { CacheEntry entry = cacheLocked(application.componentName, null, application.user, false, application.usingLowResIcon); if (entry.icon != null && !isDefaultIcon(entry.icon, application.user)) { - application.title = entry.title; + application.title = Utilities.trim(entry.title); application.iconBitmap = entry.icon; application.contentDescription = entry.contentDescription; application.usingLowResIcon = entry.isLowResIcon; @@ -464,7 +464,7 @@ public class IconCache { UserHandleCompat user, boolean usePkgIcon, boolean useLowResIcon) { CacheEntry entry = cacheLocked(component, info, user, usePkgIcon, useLowResIcon); shortcutInfo.setIcon(getNonNullIcon(entry, user)); - shortcutInfo.title = entry.title; + shortcutInfo.title = Utilities.trim(entry.title); shortcutInfo.usingFallbackIcon = isDefaultIcon(entry.icon, user); shortcutInfo.usingLowResIcon = entry.isLowResIcon; } @@ -477,7 +477,7 @@ public class IconCache { PackageItemInfo infoOut) { CacheEntry entry = getEntryForPackageLocked(packageName, user, useLowResIcon); infoOut.iconBitmap = getNonNullIcon(entry, user); - infoOut.title = entry.title; + infoOut.title = Utilities.trim(entry.title); infoOut.usingLowResIcon = entry.isLowResIcon; infoOut.contentDescription = entry.contentDescription; } @@ -530,7 +530,7 @@ public class IconCache { } if (TextUtils.isEmpty(entry.title) && info != null) { - entry.title = info.getLabel().toString(); + entry.title = info.getLabel(); entry.contentDescription = mUserManager.getBadgedLabelForUser(entry.title, user); } } |