diff options
Diffstat (limited to 'java/src/com/android/inputmethod/compat/CompatUtils.java')
-rw-r--r-- | java/src/com/android/inputmethod/compat/CompatUtils.java | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/java/src/com/android/inputmethod/compat/CompatUtils.java b/java/src/com/android/inputmethod/compat/CompatUtils.java index ba82a06ac..f1f6a1220 100644 --- a/java/src/com/android/inputmethod/compat/CompatUtils.java +++ b/java/src/com/android/inputmethod/compat/CompatUtils.java @@ -35,23 +35,16 @@ public class CompatUtils { public static Intent getInputLanguageSelectionIntent(String inputMethodId, int flagsForSubtypeSettings) { - final String action; - Intent intent; - if (InputMethodServiceCompatWrapper.CAN_HANDLE_ON_CURRENT_INPUT_METHOD_SUBTYPE_CHANGED - /* android.os.Build.VERSION_CODES.HONEYCOMB */ - && android.os.Build.VERSION.SDK_INT >= 11) { - // Refer to android.provider.Settings.ACTION_INPUT_METHOD_SUBTYPE_SETTINGS - action = INPUT_METHOD_SUBTYPE_SETTINGS; - intent = new Intent(action); - if (!TextUtils.isEmpty(inputMethodId)) { - intent.putExtra(EXTRA_INPUT_METHOD_ID, inputMethodId); - } - if (flagsForSubtypeSettings > 0) { - intent.setFlags(flagsForSubtypeSettings); - } - return intent; + // Refer to android.provider.Settings.ACTION_INPUT_METHOD_SUBTYPE_SETTINGS + final String action = INPUT_METHOD_SUBTYPE_SETTINGS; + final Intent intent = new Intent(action); + if (!TextUtils.isEmpty(inputMethodId)) { + intent.putExtra(EXTRA_INPUT_METHOD_ID, inputMethodId); } - throw new RuntimeException("Language selection doesn't supported on this platform"); + if (flagsForSubtypeSettings > 0) { + intent.setFlags(flagsForSubtypeSettings); + } + return intent; } public static Class<?> getClass(String className) { |