OSDN Git Service

Supress SuggestionPopup for original field.
authorKeisuke Kuroyanagi <ksk@google.com>
Tue, 23 Feb 2016 19:02:07 +0000 (11:02 -0800)
committerKeisuke Kuroyanagi <ksk@google.com>
Tue, 1 Mar 2016 00:41:38 +0000 (16:41 -0800)
Previously, popup window or insertion handle could be shouwn at
a strange position as they could be shown for the original input
field in full screen extracted mode.
This CL stops showing SuggestionPopup for the original input field
in full screen extracted mode.

Bug: 22038802
Bug: 27313458
Change-Id: I585913328182d996f0201c53c028a1991f7b435b

core/java/android/widget/Editor.java

index 1826dd8..77ab4cc 100644 (file)
@@ -3174,7 +3174,7 @@ public class Editor {
                 ((Spannable) mTextView.getText()).removeSpan(mSuggestionRangeSpan);
 
                 mTextView.setCursorVisible(mCursorWasVisibleBeforeSuggestions);
-                if (hasInsertionController()) {
+                if (hasInsertionController() && !extractedTextModeWillBeStarted()) {
                     getInsertionController().show();
                 }
             }
@@ -3324,6 +3324,9 @@ public class Editor {
         @Override
         public void show() {
             if (!(mTextView.getText() instanceof Editable)) return;
+            if (extractedTextModeWillBeStarted()) {
+                return;
+            }
 
             if (updateSuggestions()) {
                 mCursorWasVisibleBeforeSuggestions = mCursorVisible;