diff options
author | 2010-09-15 16:49:53 -0700 | |
---|---|---|
committer | 2010-09-15 16:49:53 -0700 | |
commit | 2b90a1adcb0d1fb1b8a082f2ef7d2658eb944cab (patch) | |
tree | acce0c782e8de48cc7953ff4bf7cca8396273532 /java/src/com/android/inputmethod/latin/LatinIME.java | |
parent | 9b2c10284b6b161f1f2c6da823e9c7c6a9a4681e (diff) | |
parent | 13a6c8c1f8691b753cd1a6b7a77d99af4f7d78ac (diff) | |
download | latinime-2b90a1adcb0d1fb1b8a082f2ef7d2658eb944cab.tar.gz latinime-2b90a1adcb0d1fb1b8a082f2ef7d2658eb944cab.tar.xz latinime-2b90a1adcb0d1fb1b8a082f2ef7d2658eb944cab.zip |
am 13a6c8c1: am 1508c0e8: Add a new preference item to show/hide the settings key.
Merge commit '13a6c8c1f8691b753cd1a6b7a77d99af4f7d78ac'
* commit '13a6c8c1f8691b753cd1a6b7a77d99af4f7d78ac':
Add a new preference item to show/hide the settings key.
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(); |