summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2015-06-18 12:48:51 -0700
committerSunny Goyal <sunnygoyal@google.com>2015-06-18 12:51:53 -0700
commit230eade4a35d9dfe9b186da46e38ca05f0256a69 (patch)
tree3b8cb7ca069583a51d07a7bbc8a99bebff3c1de8 /src
parent3ea5cd4311e095a5b6614bfcef40c08197719b22 (diff)
downloadandroid_packages_apps_Trebuchet-230eade4a35d9dfe9b186da46e38ca05f0256a69.tar.gz
android_packages_apps_Trebuchet-230eade4a35d9dfe9b186da46e38ca05f0256a69.tar.bz2
android_packages_apps_Trebuchet-230eade4a35d9dfe9b186da46e38ca05f0256a69.zip
Converting folder name to string before applying it to folder info
> getText() returns Spannable which can contain text styling Change-Id: Iacdf9da47b54b5cd290a355152383d75bf3e6836
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/Folder.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/com/android/launcher3/Folder.java b/src/com/android/launcher3/Folder.java
index 94f8fc875..85f58a1b1 100644
--- a/src/com/android/launcher3/Folder.java
+++ b/src/com/android/launcher3/Folder.java
@@ -301,14 +301,13 @@ 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.
- CharSequence newTitle = mFolderName.getText();
+ String newTitle = mFolderName.getText().toString();
mInfo.setTitle(newTitle);
LauncherModel.updateItemInDatabase(mLauncher, mInfo);
if (commit) {
sendCustomAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED,
- String.format(getContext().getString(R.string.folder_renamed),
- newTitle.toString()));
+ String.format(getContext().getString(R.string.folder_renamed), newTitle));
}
// 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.