diff options
author | Abodunrinwa Toki <toki@google.com> | 2015-10-20 00:19:23 +0100 |
---|---|---|
committer | Abodunrinwa Toki <toki@google.com> | 2015-10-20 17:11:26 +0100 |
commit | 3b8a5ea036670421ef962d6ed8b22d214e933711 (patch) | |
tree | 1fa58429fa48bd4ad752f0b5358dad68ee7bf71d /core | |
parent | 57a5cba606e5d58cc4ad1c5c1cf4918dc16fe819 (diff) | |
download | frameworks_base-3b8a5ea036670421ef962d6ed8b22d214e933711.zip frameworks_base-3b8a5ea036670421ef962d6ed8b22d214e933711.tar.gz frameworks_base-3b8a5ea036670421ef962d6ed8b22d214e933711.tar.bz2 |
Re-set PROCESS_TEXT selection if nothing was returned.
Bug: 25043887
Change-Id: If069a5e23f1adf6a2c3aac8fe7e3f19cff2e28ad
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/widget/TextView.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index a1462c4..d8139b8 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -1474,7 +1474,12 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } } } + } else if (mText instanceof Spannable) { + // Reset the selection. + stopTextActionMode(); + Selection.setSelection((Spannable) mText, getSelectionStart(), getSelectionEnd()); } + if (mEditor.hasSelectionController()) { mEditor.startSelectionActionMode(); } |