Automatically turn on "Use system language" when no subtypes become selected

Bug:  3327257

Change-Id: I99a8c2769957963db99fa72be6cc76cc9cd97abf
This commit is contained in:
satok
2011-01-11 23:19:01 +09:00
parent c9787070ba
commit 74a5414b3c

View File

@@ -152,6 +152,7 @@ public class InputMethodAndSubtypeEnabler extends SettingsPreferenceFragment {
} else {
InputMethodAndSubtypeUtil.setSubtypesPreferenceEnabled(
this, mInputMethodProperties, id, false);
updateAutoSelectionCB();
}
}
return super.onPreferenceTreeClick(preferenceScreen, preference);
@@ -247,7 +248,9 @@ public class InputMethodAndSubtypeEnabler extends SettingsPreferenceFragment {
}
private void setSubtypeAutoSelectionEnabled(String imiId, boolean autoSelectionEnabled) {
mSubtypeAutoSelectionCBMap.get(imiId).setChecked(autoSelectionEnabled);
CheckBoxPreference autoSelectionCB = mSubtypeAutoSelectionCBMap.get(imiId);
if (autoSelectionCB == null) return;
autoSelectionCB.setChecked(autoSelectionEnabled);
final List<Preference> subtypePrefs = mInputMethodAndSubtypePrefsMap.get(imiId);
for (Preference subtypePref: subtypePrefs) {
if (subtypePref instanceof CheckBoxPreference) {