Remove logic of calling InputMethodAndSubtypeUtil.
InputMethodAndLanguageSettings calls InputMethodAndSubtypeUtil for no good reason. The page does not display or provide ways to change IMEs. The virtualKeyboardFragment does, and it already contains logic for refreshing InputMethodAndSubtypeUtil. Bug: 32642706 Test: Compiles Change-Id: Icdbf9cd2fa95ba3037c1e47d62c7514376cf8037
This commit is contained in:
@@ -72,7 +72,6 @@ public class InputMethodAndLanguageSettings extends SettingsPreferenceFragment
|
|||||||
private Preference mLanguagePref;
|
private Preference mLanguagePref;
|
||||||
private InputManager mIm;
|
private InputManager mIm;
|
||||||
private Intent mIntentWaitingForResult;
|
private Intent mIntentWaitingForResult;
|
||||||
private InputMethodSettingValuesWrapper mInputMethodSettingValues;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMetricsCategory() {
|
public int getMetricsCategory() {
|
||||||
@@ -86,7 +85,6 @@ public class InputMethodAndLanguageSettings extends SettingsPreferenceFragment
|
|||||||
addPreferencesFromResource(R.xml.language_settings);
|
addPreferencesFromResource(R.xml.language_settings);
|
||||||
|
|
||||||
final Activity activity = getActivity();
|
final Activity activity = getActivity();
|
||||||
mInputMethodSettingValues = InputMethodSettingValuesWrapper.getInstance(activity);
|
|
||||||
|
|
||||||
if (activity.getAssets().getLocales().length == 1) {
|
if (activity.getAssets().getLocales().length == 1) {
|
||||||
// No "Select language" pref if there's only one system locale available.
|
// No "Select language" pref if there's only one system locale available.
|
||||||
@@ -190,10 +188,6 @@ public class InputMethodAndLanguageSettings extends SettingsPreferenceFragment
|
|||||||
updateUserDictionaryPreference(findPreference(KEY_USER_DICTIONARY_SETTINGS));
|
updateUserDictionaryPreference(findPreference(KEY_USER_DICTIONARY_SETTINGS));
|
||||||
|
|
||||||
updateInputDevices();
|
updateInputDevices();
|
||||||
|
|
||||||
// Refresh internal states in mInputMethodSettingValues to keep the latest
|
|
||||||
// "InputMethodInfo"s and "InputMethodSubtype"s
|
|
||||||
mInputMethodSettingValues.refreshAllInputMethodAndSubtypes();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -201,11 +195,6 @@ public class InputMethodAndLanguageSettings extends SettingsPreferenceFragment
|
|||||||
super.onPause();
|
super.onPause();
|
||||||
|
|
||||||
mIm.unregisterInputDeviceListener(this);
|
mIm.unregisterInputDeviceListener(this);
|
||||||
|
|
||||||
// TODO: Consolidate the logic to InputMethodSettingsWrapper
|
|
||||||
InputMethodAndSubtypeUtil.saveInputMethodSubtypeList(
|
|
||||||
this, getContentResolver(), mInputMethodSettingValues.getInputMethodList(),
|
|
||||||
false /* hasHardKeyboard */);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user