am dc64b138: Revert I432be8f7 partially
* commit 'dc64b138b5e3fb3706c0818d0a308fe6e36985b0': Revert I432be8f7 partiallymain
commit
0f121ab819
|
@ -444,6 +444,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onConfigurationChanged(Configuration conf) {
|
public void onConfigurationChanged(Configuration conf) {
|
||||||
|
mSubtypeSwitcher.onConfigurationChanged(conf);
|
||||||
// If orientation changed while predicting, commit the change
|
// If orientation changed while predicting, commit the change
|
||||||
if (conf.orientation != mOrientation) {
|
if (conf.orientation != mOrientation) {
|
||||||
InputConnection ic = getCurrentInputConnection();
|
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) {
|
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
|
||||||
if (mConfigUseSpacebarLanguageSwitcher) {
|
if (mConfigUseSpacebarLanguageSwitcher) {
|
||||||
if (Settings.PREF_SELECTED_LANGUAGES.equals(key)) {
|
if (Settings.PREF_SELECTED_LANGUAGES.equals(key)) {
|
||||||
|
|
Loading…
Reference in New Issue