aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java13
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 f80ecc6d4..ecfd41651 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -356,7 +356,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);
@@ -984,7 +984,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
@@ -1122,11 +1122,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();
@@ -1134,7 +1129,7 @@ public class LatinIME extends InputMethodService
private void onOptionKeyPressed() {
if (!isShowingOptionDialog()) {
- if (hasMultipleEnabledIMEs()) {
+ if (LatinIMEUtil.hasMultipleEnabledIMEs(this)) {
showOptionsMenu();
} else {
launchSettings();
@@ -1144,7 +1139,7 @@ public class LatinIME extends InputMethodService
private void onOptionKeyLongPressed() {
if (!isShowingOptionDialog()) {
- if (hasMultipleEnabledIMEs()) {
+ if (LatinIMEUtil.hasMultipleEnabledIMEs(this)) {
showInputMethodPicker();
} else {
launchSettings();