From 85ddfe1317a4475269e53f62c2338c335e02e839 Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Mon, 25 Aug 2014 04:42:15 +0000 Subject: Revert "Revert "[ML1] Introduce RichInputMethodSubtype"" This reverts commit a63d0a8ee6cb05bcddb69bf9a6018853d89d886a. This patch seems to be fine after all, but was submitted without its companion [ML1.1] patch causing a build breakage. Reverting the revert and submitting both at the same time seems like the right thing to do. Change-Id: Ib8fefa40b74dcee0edb025a52dac9b35c82d49df --- .../inputmethod/compat/InputMethodSubtypeCompatUtils.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'java/src/com/android/inputmethod/compat') diff --git a/java/src/com/android/inputmethod/compat/InputMethodSubtypeCompatUtils.java b/java/src/com/android/inputmethod/compat/InputMethodSubtypeCompatUtils.java index 365867257..3abfa3fc9 100644 --- a/java/src/com/android/inputmethod/compat/InputMethodSubtypeCompatUtils.java +++ b/java/src/com/android/inputmethod/compat/InputMethodSubtypeCompatUtils.java @@ -20,7 +20,7 @@ import android.os.Build; import android.view.inputmethod.InputMethodSubtype; import com.android.inputmethod.annotations.UsedForTesting; -import com.android.inputmethod.latin.Constants; +import com.android.inputmethod.latin.RichInputMethodSubtype; import java.lang.reflect.Constructor; import java.lang.reflect.Method; @@ -64,9 +64,12 @@ public final class InputMethodSubtypeCompatUtils { overridesImplicitlyEnabledSubtype, id); } + public static boolean isAsciiCapable(final RichInputMethodSubtype subtype) { + return isAsciiCapable(subtype.getRawSubtype()); + } + public static boolean isAsciiCapable(final InputMethodSubtype subtype) { - return isAsciiCapableWithAPI(subtype) - || subtype.containsExtraValueKey(Constants.Subtype.ExtraValue.ASCII_CAPABLE); + return InputMethodSubtypeCompatUtils.isAsciiCapableWithAPI(subtype); } @UsedForTesting -- cgit v1.2.3-83-g751a