summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/inputmethod
diff options
context:
space:
mode:
authorYohei Yukawa <yukawa@google.com>2015-02-21 03:06:51 +0900
committerYohei Yukawa <yukawa@google.com>2015-03-17 10:26:52 +0000
commitf9b806e5e9814728bf649a90872a6d17a0bbcbbf (patch)
tree9fe5c79c9aa5b3260d8bc1232ac081affb213e5d /src/com/android/settings/inputmethod
parente535e5cbe0ef9b32bde5e4594676c43f450b2187 (diff)
downloadpackages_apps_Settings-f9b806e5e9814728bf649a90872a6d17a0bbcbbf.zip
packages_apps_Settings-f9b806e5e9814728bf649a90872a6d17a0bbcbbf.tar.gz
packages_apps_Settings-f9b806e5e9814728bf649a90872a6d17a0bbcbbf.tar.bz2
Stop using InputMethodUtils.isValidSystemDefaultIme
This is a follow up CL for a recent attempt to minimize the number of default enabled IMEs. - part1: I831502db502f4073c9c2f50ce7705a4e45e2e1e3 - part2: Ife93d909fb8a24471c425c903e2b7048826e17a3 - part3: I6571d464a46453934f0a8f5e79018a67a9a3c845 - part4: I871ccda787eb0f1099ba3574356c1da4b33681f3 In the above changes, InputMethodUtils.isValidSystemDefaultIme was deprecated in favor of InputMethodUtils.isSystemImeThatHasSubtypeOf. With this CL, InputMethodUtils.isValidSystemDefaultIme is not used by the setting app anymore and we can remove that method from InputMethodUtils finally. This is a pure code refactoring with preserving the current logic. Hence no behavior change is intended. Change-Id: Ie96b0d17745735db63eebe6fe1654f32d9b9a170
Diffstat (limited to 'src/com/android/settings/inputmethod')
-rw-r--r--src/com/android/settings/inputmethod/InputMethodSettingValuesWrapper.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/com/android/settings/inputmethod/InputMethodSettingValuesWrapper.java b/src/com/android/settings/inputmethod/InputMethodSettingValuesWrapper.java
index ada476e..8f10bdf 100644
--- a/src/com/android/settings/inputmethod/InputMethodSettingValuesWrapper.java
+++ b/src/com/android/settings/inputmethod/InputMethodSettingValuesWrapper.java
@@ -186,13 +186,16 @@ class InputMethodSettingValuesWrapper {
if (imi.isAuxiliaryIme()) {
return false;
}
- if (InputMethodUtils.isValidSystemDefaultIme(true /* isSystemReady */, imi, context)) {
+ final Locale systemLocale = context.getResources().getConfiguration().locale;
+ if (InputMethodUtils.isSystemImeThatHasSubtypeOf(imi, context,
+ true /* checkDefaultAttribute */, systemLocale, false /* checkCountry */,
+ InputMethodUtils.SUBTYPE_MODE_ANY)) {
return true;
}
if (mAsciiCapableEnabledImis.isEmpty()) {
Log.w(TAG, "ascii capable subtype enabled imi not found. Fall back to English"
+ " Keyboard subtype.");
- return InputMethodUtils.containsSubtypeOf(imi, Locale.ENGLISH.getLanguage(),
+ return InputMethodUtils.containsSubtypeOf(imi, Locale.ENGLISH, false /* checkCountry */,
InputMethodUtils.SUBTYPE_MODE_KEYBOARD);
}
return mAsciiCapableEnabledImis.contains(imi);