aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/compat/EditorInfoCompatUtils.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2012-02-16 23:14:14 -0800
committerTadashi G. Takaoka <takaoka@google.com>2012-02-21 22:50:50 -0800
commit05bfd189a88be79ddfc74d0ea21792e2fb78f2aa (patch)
tree106c9ad68728c8a63d5a055dcd82c91bf8172a61 /java/src/com/android/inputmethod/compat/EditorInfoCompatUtils.java
parent97bde43740d8ba7f8aedde35d20621823140966c (diff)
downloadlatinime-05bfd189a88be79ddfc74d0ea21792e2fb78f2aa.tar.gz
latinime-05bfd189a88be79ddfc74d0ea21792e2fb78f2aa.tar.xz
latinime-05bfd189a88be79ddfc74d0ea21792e2fb78f2aa.zip
Add next/prev navigate action more keys and remove tab key
Bug: 6037537 Bug: 5961814 Change-Id: I9c6dedf953452a180fcd5bce7bfadfd3c821f224
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, 5 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/compat/EditorInfoCompatUtils.java b/java/src/com/android/inputmethod/compat/EditorInfoCompatUtils.java
index 3247997f6..938388d6c 100644
--- a/java/src/com/android/inputmethod/compat/EditorInfoCompatUtils.java
+++ b/java/src/com/android/inputmethod/compat/EditorInfoCompatUtils.java
@@ -39,30 +39,30 @@ public class EditorInfoCompatUtils {
private static final Integer OBJ_IME_ACTION_PREVIOUS = (Integer) CompatUtils
.getFieldValue(null, null, FIELD_IME_ACTION_PREVIOUS);
+ // EditorInfo.IME_FLAG_NAVIGATE_NEXT has been introduced since API#11 (Honeycomb).
public static boolean hasFlagNavigateNext(int imeOptions) {
if (OBJ_IME_FLAG_NAVIGATE_NEXT == null)
return false;
return (imeOptions & OBJ_IME_FLAG_NAVIGATE_NEXT) != 0;
}
+ // EditorInfo.IME_FLAG_NAVIGATE_PREVIOUS has been introduced since API#11 (Honeycomb).
public static boolean hasFlagNavigatePrevious(int imeOptions) {
if (OBJ_IME_FLAG_NAVIGATE_PREVIOUS == null)
return false;
return (imeOptions & OBJ_IME_FLAG_NAVIGATE_PREVIOUS) != 0;
}
+ // EditorInfo.IME_FLAG_FORCE_ASCII has been introduced since API#16 (JellyBean).
public static boolean hasFlagForceAscii(int imeOptions) {
if (OBJ_IME_FLAG_FORCE_ASCII == null)
return false;
return (imeOptions & OBJ_IME_FLAG_FORCE_ASCII) != 0;
}
- public static void performEditorActionNext(InputConnection ic) {
- ic.performEditorAction(EditorInfo.IME_ACTION_NEXT);
- }
-
+ // EditorInfo.IME_ACTION_PREVIOUS has been introduced since API#11 (Honeycomb).
public static void performEditorActionPrevious(InputConnection ic) {
- if (OBJ_IME_ACTION_PREVIOUS == null)
+ if (OBJ_IME_ACTION_PREVIOUS == null || ic == null)
return;
ic.performEditorAction(OBJ_IME_ACTION_PREVIOUS);
}