summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Folder.java
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2015-05-08 17:00:10 -0700
committerWinson Chung <winsonc@google.com>2015-05-08 22:22:39 -0700
commit82b016cb56540fe26213e817dd0dd668099c8e20 (patch)
tree528066331689070902b505306abaecbbfbf648d0 /src/com/android/launcher3/Folder.java
parent99d96ba6c8e3258f7d99a33d49da2aeb0da5d862 (diff)
downloadandroid_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/Folder.java')
-rw-r--r--src/com/android/launcher3/Folder.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com/android/launcher3/Folder.java b/src/com/android/launcher3/Folder.java
index a2828054c..7a3ae3995 100644
--- a/src/com/android/launcher3/Folder.java
+++ b/src/com/android/launcher3/Folder.java
@@ -296,13 +296,14 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList
mFolderName.setHint(sHintText);
// Convert to a string here to ensure that no other state associated with the text field
// gets saved.
- String newTitle = mFolderName.getText().toString();
+ CharSequence newTitle = mFolderName.getText();
mInfo.setTitle(newTitle);
LauncherModel.updateItemInDatabase(mLauncher, mInfo);
if (commit) {
sendCustomAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED,
- String.format(getContext().getString(R.string.folder_renamed), newTitle));
+ String.format(getContext().getString(R.string.folder_renamed),
+ newTitle.toString()));
}
// In order to clear the focus from the text field, we set the focus on ourself. This
// ensures that every time the field is clicked, focus is gained, giving reliable behavior.