Stop using a deprecated constructor of InputMethodSettings.

This is a follow up CL to my previous CL [1], which added a new
constructor to InputMethodSettings to support File-Based
Encryption (FBE).

Settings app is the only remaining package that depends on the previous
constructor.  To completely deprecate the previous one, this CL lets the
caller switch to the new constructor.

Note that this CL does not change the initial parameters of
InputMethodSettings.  In other words this is a mechanical code
clean-up.

  [1] I9c6f9bb3d51174198e5f73588637f87ea0d90e11
      5db2f16f15549c490c9541602a96f42bef984acb

Bug: 26279466
Change-Id: I09cba4066b95c4a9e89a3e4f83d75b97882502dc
This commit is contained in:
Yohei Yukawa
2016-03-16 20:50:28 -07:00
parent 2ccf1fd7c9
commit 143a686947
2 changed files with 3 additions and 2 deletions

View File

@@ -73,7 +73,7 @@ class InputMethodSettingValuesWrapper {
// Ensure singleton // Ensure singleton
private InputMethodSettingValuesWrapper(Context context) { private InputMethodSettingValuesWrapper(Context context) {
mSettings = new InputMethodSettings(context.getResources(), context.getContentResolver(), mSettings = new InputMethodSettings(context.getResources(), context.getContentResolver(),
mMethodMap, mMethodList, getDefaultCurrentUserId()); mMethodMap, mMethodList, getDefaultCurrentUserId(), false /* copyOnWrite */);
mImm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); mImm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
refreshAllInputMethodAndSubtypes(); refreshAllInputMethodAndSubtypes();
} }

View File

@@ -79,7 +79,8 @@ public final class PhysicalKeyboardFragment extends SettingsPreferenceFragment
getContentResolver(), getContentResolver(),
new HashMap<String, InputMethodInfo>(), new HashMap<String, InputMethodInfo>(),
new ArrayList<InputMethodInfo>(), new ArrayList<InputMethodInfo>(),
USER_SYSTEM); USER_SYSTEM,
false /* copyOnWrite */);
mKeyboardAssistanceCategory = Preconditions.checkNotNull( mKeyboardAssistanceCategory = Preconditions.checkNotNull(
(PreferenceCategory) findPreference(KEYBOARD_ASSISTANCE_CATEGORY)); (PreferenceCategory) findPreference(KEYBOARD_ASSISTANCE_CATEGORY));
mShowVirtualKeyboardSwitch = Preconditions.checkNotNull( mShowVirtualKeyboardSwitch = Preconditions.checkNotNull(