Update enabled subtypes in the input method subtype enabler in "onResume"
Bug: 5446825 Change-Id: Iab52ecb8a7334b7be3a81350fbfc9b02d09e88d4
This commit is contained in:
@@ -317,10 +317,10 @@ public class InputMethodAndSubtypeUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
setSubtypesPreferenceEnabled(context, inputMethodInfos, imiId, isEnabled);
|
setSubtypesPreferenceEnabled(context, inputMethodInfos, imiId, isEnabled);
|
||||||
|
}
|
||||||
|
}
|
||||||
updateSubtypesPreferenceChecked(context, inputMethodInfos, enabledSubtypes);
|
updateSubtypesPreferenceChecked(context, inputMethodInfos, enabledSubtypes);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void setSubtypesPreferenceEnabled(SettingsPreferenceFragment context,
|
public static void setSubtypesPreferenceEnabled(SettingsPreferenceFragment context,
|
||||||
List<InputMethodInfo> inputMethodProperties, String id, boolean enabled) {
|
List<InputMethodInfo> inputMethodProperties, String id, boolean enabled) {
|
||||||
@@ -346,7 +346,8 @@ public class InputMethodAndSubtypeUtil {
|
|||||||
PreferenceScreen preferenceScreen = context.getPreferenceScreen();
|
PreferenceScreen preferenceScreen = context.getPreferenceScreen();
|
||||||
for (InputMethodInfo imi : inputMethodProperties) {
|
for (InputMethodInfo imi : inputMethodProperties) {
|
||||||
String id = imi.getId();
|
String id = imi.getId();
|
||||||
HashSet<String> enabledSubtypesSet = enabledSubtypes.get(id);
|
if (!enabledSubtypes.containsKey(id)) break;
|
||||||
|
final HashSet<String> enabledSubtypesSet = enabledSubtypes.get(id);
|
||||||
final int subtypeCount = imi.getSubtypeCount();
|
final int subtypeCount = imi.getSubtypeCount();
|
||||||
for (int i = 0; i < subtypeCount; ++i) {
|
for (int i = 0; i < subtypeCount; ++i) {
|
||||||
InputMethodSubtype subtype = imi.getSubtypeAt(i);
|
InputMethodSubtype subtype = imi.getSubtypeAt(i);
|
||||||
|
@@ -226,6 +226,7 @@ public class InputMethodPreference extends CheckBoxPreference
|
|||||||
public void setChecked(boolean checked) {
|
public void setChecked(boolean checked) {
|
||||||
super.setChecked(checked);
|
super.setChecked(checked);
|
||||||
saveImeSettings();
|
saveImeSettings();
|
||||||
|
updateSummary();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showSecurityWarnDialog(InputMethodInfo imi, final CheckBoxPreference chkPref) {
|
private void showSecurityWarnDialog(InputMethodInfo imi, final CheckBoxPreference chkPref) {
|
||||||
|
Reference in New Issue
Block a user