* commit '0f121ab8191fee161247ad294eb7015de9871301': Revert I432be8f7 partially
This commit is contained in:
commit
e56915599c
2 changed files with 18 additions and 0 deletions
|
@ -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();
|
||||
|
|
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue