aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/compat
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/com/android/inputmethod/compat')
-rw-r--r--java/src/com/android/inputmethod/compat/InputMethodSubtypeCompatUtils.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/compat/InputMethodSubtypeCompatUtils.java b/java/src/com/android/inputmethod/compat/InputMethodSubtypeCompatUtils.java
index 4ea7fb888..ee9125a07 100644
--- a/java/src/com/android/inputmethod/compat/InputMethodSubtypeCompatUtils.java
+++ b/java/src/com/android/inputmethod/compat/InputMethodSubtypeCompatUtils.java
@@ -19,6 +19,7 @@ package com.android.inputmethod.compat;
import android.os.Build;
import android.view.inputmethod.InputMethodSubtype;
+import com.android.inputmethod.annotations.UsedForTesting;
import com.android.inputmethod.latin.Constants;
import java.lang.reflect.Constructor;
@@ -64,7 +65,12 @@ public final class InputMethodSubtypeCompatUtils {
}
public static boolean isAsciiCapable(final InputMethodSubtype subtype) {
- return (Boolean)CompatUtils.invoke(subtype, false, METHOD_isAsciiCapable)
+ return isAsciiCapableWithAPI(subtype)
|| subtype.containsExtraValueKey(Constants.Subtype.ExtraValue.ASCII_CAPABLE);
}
+
+ @UsedForTesting
+ public static boolean isAsciiCapableWithAPI(final InputMethodSubtype subtype) {
+ return (Boolean)CompatUtils.invoke(subtype, false, METHOD_isAsciiCapable);
+ }
}