From 4a696ac7ca0d9c6e1f837cbf83ef055e6e0c9bc2 Mon Sep 17 00:00:00 2001 From: Keisuke Kuroyanagi Date: Tue, 23 Feb 2016 11:02:07 -0800 Subject: [PATCH] Supress SuggestionPopup for original field. 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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/java/android/widget/Editor.java b/core/java/android/widget/Editor.java index 1826dd82abed9..77ab4ccc6dbc6 100644 --- a/core/java/android/widget/Editor.java +++ b/core/java/android/widget/Editor.java @@ -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;