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/ShortcutInfo.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/ShortcutInfo.java')
-rw-r--r-- | src/com/android/launcher3/ShortcutInfo.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/com/android/launcher3/ShortcutInfo.java b/src/com/android/launcher3/ShortcutInfo.java index 6354fcd28..8be48721c 100644 --- a/src/com/android/launcher3/ShortcutInfo.java +++ b/src/com/android/launcher3/ShortcutInfo.java @@ -153,7 +153,7 @@ public class ShortcutInfo extends ItemInfo { Bitmap icon, UserHandleCompat user) { this(); this.intent = intent; - this.title = title; + this.title = Utilities.trim(title); this.contentDescription = contentDescription; mIcon = icon; this.user = user; @@ -161,7 +161,7 @@ public class ShortcutInfo extends ItemInfo { public ShortcutInfo(Context context, ShortcutInfo info) { super(info); - title = info.title.toString(); + title = Utilities.trim(info.title); intent = new Intent(info.intent); if (info.iconResource != null) { iconResource = new Intent.ShortcutIconResource(); @@ -179,7 +179,7 @@ public class ShortcutInfo extends ItemInfo { /** TODO: Remove this. It's only called by ApplicationInfo.makeShortcut. */ public ShortcutInfo(AppInfo info) { super(info); - title = info.title.toString(); + title = Utilities.trim(info.title); intent = new Intent(info.intent); customIcon = false; flags = info.flags; @@ -281,7 +281,7 @@ public class ShortcutInfo extends ItemInfo { public static ShortcutInfo fromActivityInfo(LauncherActivityInfoCompat info, Context context) { final ShortcutInfo shortcut = new ShortcutInfo(); shortcut.user = info.getUser(); - shortcut.title = info.getLabel().toString(); + shortcut.title = Utilities.trim(info.getLabel()); shortcut.contentDescription = UserManagerCompat.getInstance(context) .getBadgedLabelForUser(info.getLabel(), info.getUser()); shortcut.customIcon = false; |