diff options
author | 2011-01-17 01:00:22 -0800 | |
---|---|---|
committer | 2011-01-17 01:00:22 -0800 | |
commit | 0f121ab8191fee161247ad294eb7015de9871301 (patch) | |
tree | d879ba2c4a56bdac7116e366bbaf7e3717d06917 /java/src | |
parent | 84a963d5637b3eadd5fad6914f4986d58f81c746 (diff) | |
parent | dc64b138b5e3fb3706c0818d0a308fe6e36985b0 (diff) | |
download | latinime-0f121ab8191fee161247ad294eb7015de9871301.tar.gz latinime-0f121ab8191fee161247ad294eb7015de9871301.tar.xz latinime-0f121ab8191fee161247ad294eb7015de9871301.zip |
am dc64b138: Revert I432be8f7 partially
* commit 'dc64b138b5e3fb3706c0818d0a308fe6e36985b0':
Revert I432be8f7 partially
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 1 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/latin/SubtypeSwitcher.java | 17 |
2 files changed, 18 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index bea44eef2..4a78c2e7a 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -444,6 +444,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen @Override public void onConfigurationChanged(Configuration conf) { + mSubtypeSwitcher.onConfigurationChanged(conf); // If orientation changed while predicting, commit the change if (conf.orientation != mOrientation) { InputConnection ic = getCurrentInputConnection(); diff --git a/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java b/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java index 968495b8e..21c99fe09 100644 --- a/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java +++ b/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java @@ -370,6 +370,23 @@ public class SubtypeSwitcher { } } + public void onConfigurationChanged(Configuration conf) { + final Locale systemLocale = conf.locale; + // If system configuration was changed, update all parameters. + if (!TextUtils.equals(systemLocale.toString(), mSystemLocale.toString())) { + if (mConfigUseSpacebarLanguageSwitcher) { + // If the system locale changes and is different from the saved + // locale (mSystemLocale), then reload the input locale list from the + // latin ime settings (shared prefs) and reset the input locale + // to the first one. + mLanguageSwitcher.loadLocales(mPrefs); + mLanguageSwitcher.setSystemLocale(systemLocale); + } else { + updateAllParameters(); + } + } + } + public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { if (mConfigUseSpacebarLanguageSwitcher) { if (Settings.PREF_SELECTED_LANGUAGES.equals(key)) { |