aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/compat/EditorInfoCompatUtils.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2011-07-15 16:21:16 -0700
committerTadashi G. Takaoka <takaoka@google.com>2011-07-15 16:21:16 -0700
commit2811841ab49b5c380a2e5b7f3e3d009db67f8e0a (patch)
tree03de7ede863826700065d329544f7070b866ac74 /java/src/com/android/inputmethod/compat/EditorInfoCompatUtils.java
parent5ba0577eb21de1566a06f3871822f026f7aab5cd (diff)
downloadlatinime-2811841ab49b5c380a2e5b7f3e3d009db67f8e0a.tar.gz
latinime-2811841ab49b5c380a2e5b7f3e3d009db67f8e0a.tar.xz
latinime-2811841ab49b5c380a2e5b7f3e3d009db67f8e0a.zip
Honor EditorType's IME_FLAG_NO_EXTRACT_UI and IME_FLAG_NO_FULLSCREEN flags
Bug: 5030408 Change-Id: I1c5649725780cd063db7a437b8559b7f2573469c
Diffstat (limited to 'java/src/com/android/inputmethod/compat/EditorInfoCompatUtils.java')
-rw-r--r--java/src/com/android/inputmethod/compat/EditorInfoCompatUtils.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/compat/EditorInfoCompatUtils.java b/java/src/com/android/inputmethod/compat/EditorInfoCompatUtils.java
index bcdcef7dc..194741087 100644
--- a/java/src/com/android/inputmethod/compat/EditorInfoCompatUtils.java
+++ b/java/src/com/android/inputmethod/compat/EditorInfoCompatUtils.java
@@ -26,12 +26,16 @@ public class EditorInfoCompatUtils {
EditorInfo.class, "IME_FLAG_NAVIGATE_NEXT");
private static final Field FIELD_IME_FLAG_NAVIGATE_PREVIOUS = CompatUtils.getField(
EditorInfo.class, "IME_FLAG_NAVIGATE_PREVIOUS");
+ private static final Field FIELD_IME_FLAG_NO_FULLSCREEN = CompatUtils.getField(
+ EditorInfo.class, "IME_FLAG_NO_FULLSCREEN");
private static final Field FIELD_IME_ACTION_PREVIOUS = CompatUtils.getField(
EditorInfo.class, "IME_ACTION_PREVIOUS");
private static final Integer OBJ_IME_FLAG_NAVIGATE_NEXT = (Integer) CompatUtils
.getFieldValue(null, null, FIELD_IME_FLAG_NAVIGATE_NEXT);
private static final Integer OBJ_IME_FLAG_NAVIGATE_PREVIOUS = (Integer) CompatUtils
.getFieldValue(null, null, FIELD_IME_FLAG_NAVIGATE_PREVIOUS);
+ private static final Integer OBJ_IME_FLAG_NO_FULLSCREEN = (Integer) CompatUtils
+ .getFieldValue(null, null, FIELD_IME_FLAG_NO_FULLSCREEN);
private static final Integer OBJ_IME_ACTION_PREVIOUS = (Integer) CompatUtils
.getFieldValue(null, null, FIELD_IME_ACTION_PREVIOUS);
@@ -47,6 +51,12 @@ public class EditorInfoCompatUtils {
return (imeOptions & OBJ_IME_FLAG_NAVIGATE_PREVIOUS) != 0;
}
+ public static boolean hasFlagNoFullscreen(int imeOptions) {
+ if (FIELD_IME_FLAG_NO_FULLSCREEN == null)
+ return false;
+ return (imeOptions & OBJ_IME_FLAG_NO_FULLSCREEN) != 0;
+ }
+
public static void performEditorActionNext(InputConnection ic) {
ic.performEditorAction(EditorInfo.IME_ACTION_NEXT);
}