Bug 5352720: IME_FLAG_NO_EXTRACT_UI is not enforced
CL https://android-git.corp.google.com/g/#/c/136474 refactored
the fullscreen test, but ithe IME_FLAG_NO_EXTRACT_UI test was
lost in the process.
Note that there is still a problem (orthogonal to that change
with key_preview_backing, which appears opaque and black sometimes.
I'll re-open 5315001.
Change-Id: If3a73179d21eaca10bdc948db7bac4b4f7a88d34
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 61b2e93..ff02266 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -991,8 +991,17 @@
@Override
public boolean onEvaluateFullscreenMode() {
- return super.onEvaluateFullscreenMode()
- && mResources.getBoolean(R.bool.config_use_fullscreen_mode);
+ if (!super.onEvaluateFullscreenMode()) return false;
+
+ final EditorInfo ei = getCurrentInputEditorInfo();
+ if (ei != null) {
+ final int imeOptions = ei.imeOptions;
+ if ((imeOptions & EditorInfo.IME_FLAG_NO_EXTRACT_UI) != 0) {
+ return false;
+ }
+ }
+
+ return mResources.getBoolean(R.bool.config_use_fullscreen_mode);
}
@Override