Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cabde98b authored by Satoshi Kataoka's avatar Satoshi Kataoka
Browse files

Change the refresh timing in input method settings

Bug: 8364845
Change-Id: I564a4b0d80cec5be670e2ca89e09d45944671082
parent 5aef342a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -98,6 +98,8 @@ public class InputMethodAndLanguageSettings extends SettingsPreferenceFragment
            new OnPreferenceChangeListener() {
                @Override
                public boolean onPreferenceChange(Preference arg0, Object arg1) {
                    InputMethodSettingValuesWrapper.getInstance(
                            arg0.getContext()).refreshAllInputMethodAndSubtypes();
                    ((BaseAdapter)getPreferenceScreen().getRootAdapter()).notifyDataSetChanged();
                    updateInputMethodPreferenceViews();
                    return true;
+4 −0
Original line number Diff line number Diff line
@@ -107,6 +107,10 @@ public class InputMethodAndSubtypeEnabler extends SettingsPreferenceFragment {
    @Override
    public void onResume() {
        super.onResume();
        // Refresh internal states in mInputMethodSettingValues to keep the latest
        // "InputMethodInfo"s and "InputMethodSubtype"s
        InputMethodSettingValuesWrapper
                .getInstance(getActivity()).refreshAllInputMethodAndSubtypes();
        InputMethodAndSubtypeUtil.loadInputMethodSubtypeList(
                this, getContentResolver(), mInputMethodProperties, mInputMethodAndSubtypePrefsMap);
        updateAutoSelectionCB();
+0 −2
Original line number Diff line number Diff line
@@ -251,8 +251,6 @@ public class InputMethodPreference extends CheckBoxPreference {
        super.setChecked(checked);
        if (save) {
            saveImeSettings();
            InputMethodSettingValuesWrapper.getInstance(
                    getContext()).refreshAllInputMethodAndSubtypes();
            if (wasChecked != checked && mOnImePreferenceChangeListener != null) {
                mOnImePreferenceChangeListener.onPreferenceChange(this, checked);
            }