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
diff --git a/core/java/android/widget/Editor.java b/core/java/android/widget/Editor.java
index 1826dd8..77ab4cc 100644
--- a/core/java/android/widget/Editor.java
+++ b/core/java/android/widget/Editor.java
@@ -3174,7 +3174,7 @@
((Spannable) mTextView.getText()).removeSpan(mSuggestionRangeSpan);
mTextView.setCursorVisible(mCursorWasVisibleBeforeSuggestions);
- if (hasInsertionController()) {
+ if (hasInsertionController() && !extractedTextModeWillBeStarted()) {
getInsertionController().show();
}
}
@@ -3324,6 +3324,9 @@
@Override
public void show() {
if (!(mTextView.getText() instanceof Editable)) return;
+ if (extractedTextModeWillBeStarted()) {
+ return;
+ }
if (updateSuggestions()) {
mCursorWasVisibleBeforeSuggestions = mCursorVisible;