aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/compat/EditorInfoCompatUtils.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2012-02-21 23:09:58 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-02-21 23:09:58 -0800
commit1b3c16c183ad644ce687e193d9c779cdd7a37d3f (patch)
treecb6f53e8d5c340885dfdbcd662432f1783d964ef /java/src/com/android/inputmethod/compat/EditorInfoCompatUtils.java
parentc6993e4947d0d2c5ac673fbaa99c816b69043074 (diff)
parent05bfd189a88be79ddfc74d0ea21792e2fb78f2aa (diff)
downloadlatinime-1b3c16c183ad644ce687e193d9c779cdd7a37d3f.tar.gz
latinime-1b3c16c183ad644ce687e193d9c779cdd7a37d3f.tar.xz
latinime-1b3c16c183ad644ce687e193d9c779cdd7a37d3f.zip
Merge "Add next/prev navigate action more keys and remove tab key"
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);
}