diff options
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 3e1f610e3..1aec980a4 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -355,7 +355,7 @@ public class LatinIME extends InputMethodService final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); mLanguageSwitcher = new LanguageSwitcher(this); mLanguageSwitcher.loadLocales(prefs); - mKeyboardSwitcher = new KeyboardSwitcher(this, this); + mKeyboardSwitcher = new KeyboardSwitcher(this); mKeyboardSwitcher.setLanguageSwitcher(mLanguageSwitcher); mSystemLocale = conf.locale.toString(); mLanguageSwitcher.setSystemLocale(conf.locale); @@ -983,7 +983,7 @@ public class LatinIME extends InputMethodService private void reloadKeyboards() { if (mKeyboardSwitcher == null) { - mKeyboardSwitcher = new KeyboardSwitcher(this, this); + mKeyboardSwitcher = new KeyboardSwitcher(this); } mKeyboardSwitcher.setLanguageSwitcher(mLanguageSwitcher); if (mKeyboardSwitcher.getInputView() != null @@ -1121,11 +1121,6 @@ public class LatinIME extends InputMethodService } } - private boolean hasMultipleEnabledIMEs() { - return ((InputMethodManager) getSystemService( - INPUT_METHOD_SERVICE)).getEnabledInputMethodList().size() > 1; - } - private void showInputMethodPicker() { ((InputMethodManager) getSystemService(INPUT_METHOD_SERVICE)) .showInputMethodPicker(); @@ -1133,7 +1128,7 @@ public class LatinIME extends InputMethodService private void onOptionKeyPressed() { if (!isShowingOptionDialog()) { - if (hasMultipleEnabledIMEs()) { + if (LatinIMEUtil.hasMultipleEnabledIMEs(this)) { showOptionsMenu(); } else { launchSettings(); @@ -1143,7 +1138,7 @@ public class LatinIME extends InputMethodService private void onOptionKeyLongPressed() { if (!isShowingOptionDialog()) { - if (hasMultipleEnabledIMEs()) { + if (LatinIMEUtil.hasMultipleEnabledIMEs(this)) { showInputMethodPicker(); } else { launchSettings(); |