diff options
author | 2010-09-15 10:58:00 -0700 | |
---|---|---|
committer | 2010-09-15 10:58:00 -0700 | |
commit | 13a6c8c1f8691b753cd1a6b7a77d99af4f7d78ac (patch) | |
tree | a2755c38c6839d205e610ba19bd1c3819d4c760d /java/src/com/android/inputmethod/latin/LatinIME.java | |
parent | d6210de709a0ed724f355743f196e827ebd7df50 (diff) | |
parent | 1508c0e84f0cd93ab6f5d46fea5026e833f299bc (diff) | |
download | latinime-13a6c8c1f8691b753cd1a6b7a77d99af4f7d78ac.tar.gz latinime-13a6c8c1f8691b753cd1a6b7a77d99af4f7d78ac.tar.xz latinime-13a6c8c1f8691b753cd1a6b7a77d99af4f7d78ac.zip |
am 1508c0e8: Add a new preference item to show/hide the settings key.
Merge commit '1508c0e84f0cd93ab6f5d46fea5026e833f299bc' into gingerbread-plus-aosp
* commit '1508c0e84f0cd93ab6f5d46fea5026e833f299bc':
Add a new preference item to show/hide the settings key.
Diffstat (limited to '')
-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 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(); |