[Keyboard Setting] Rename KeyboardSettingUtils
rename KeyboardSettingUtils to match more about usage. Bug: 379594195 Test: atest SettingsRoboTests Flag: NONE, rename file. Change-Id: If978e7b56ecbdb0b571db5ff34553bbb20f976ee
This commit is contained in:
@@ -40,7 +40,7 @@ import com.android.settings.Utils;
|
||||
import com.android.settings.core.SubSettingLauncher;
|
||||
import com.android.settings.dashboard.DashboardFragment;
|
||||
import com.android.settings.dashboard.profileselector.ProfileSelectFragment;
|
||||
import com.android.settings.inputmethod.NewKeyboardSettingsUtils.KeyboardInfo;
|
||||
import com.android.settings.inputmethod.InputPeripheralsSettingsUtils.KeyboardInfo;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
@@ -117,14 +117,15 @@ public class NewKeyboardLayoutEnabledLocalesFragment extends DashboardFragment
|
||||
return;
|
||||
}
|
||||
mInputDeviceIdentifier =
|
||||
arguments.getParcelable(NewKeyboardSettingsUtils.EXTRA_INPUT_DEVICE_IDENTIFIER,
|
||||
arguments.getParcelable(
|
||||
InputPeripheralsSettingsUtils.EXTRA_INPUT_DEVICE_IDENTIFIER,
|
||||
InputDeviceIdentifier.class);
|
||||
if (mInputDeviceIdentifier == null) {
|
||||
Log.e(TAG, "The inputDeviceIdentifier should not be null");
|
||||
return;
|
||||
}
|
||||
InputDevice inputDevice =
|
||||
NewKeyboardSettingsUtils.getInputDevice(mIm, mInputDeviceIdentifier);
|
||||
InputPeripheralsSettingsUtils.getInputDevice(mIm, mInputDeviceIdentifier);
|
||||
if (inputDevice == null) {
|
||||
Log.e(TAG, "inputDevice is null");
|
||||
return;
|
||||
@@ -138,7 +139,7 @@ public class NewKeyboardLayoutEnabledLocalesFragment extends DashboardFragment
|
||||
super.onStart();
|
||||
mIm.registerInputDeviceListener(this, null);
|
||||
InputDevice inputDevice =
|
||||
NewKeyboardSettingsUtils.getInputDevice(mIm, mInputDeviceIdentifier);
|
||||
InputPeripheralsSettingsUtils.getInputDevice(mIm, mInputDeviceIdentifier);
|
||||
if (inputDevice == null) {
|
||||
Log.e(TAG, "Unable to start: input device is null");
|
||||
getActivity().finish();
|
||||
@@ -161,7 +162,7 @@ public class NewKeyboardLayoutEnabledLocalesFragment extends DashboardFragment
|
||||
}
|
||||
|
||||
private void updateCheckedState() {
|
||||
if (NewKeyboardSettingsUtils.getInputDevice(mIm, mInputDeviceIdentifier) == null) {
|
||||
if (InputPeripheralsSettingsUtils.getInputDevice(mIm, mInputDeviceIdentifier) == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -207,9 +208,9 @@ public class NewKeyboardLayoutEnabledLocalesFragment extends DashboardFragment
|
||||
private void mapLanguageWithLayout(InputMethodInfo info, InputMethodSubtype subtype) {
|
||||
CharSequence subtypeLabel = getSubtypeLabel(mContext, info, subtype);
|
||||
KeyboardLayout[] keyboardLayouts =
|
||||
NewKeyboardSettingsUtils.getKeyboardLayouts(
|
||||
InputPeripheralsSettingsUtils.getKeyboardLayouts(
|
||||
mIm, mUserId, mInputDeviceIdentifier, info, subtype);
|
||||
KeyboardLayoutSelectionResult result = NewKeyboardSettingsUtils.getKeyboardLayout(
|
||||
KeyboardLayoutSelectionResult result = InputPeripheralsSettingsUtils.getKeyboardLayout(
|
||||
mIm, mUserId, mInputDeviceIdentifier, info, subtype);
|
||||
if (result.getLayoutDescriptor() != null) {
|
||||
for (int i = 0; i < keyboardLayouts.length; i++) {
|
||||
@@ -316,13 +317,14 @@ public class NewKeyboardLayoutEnabledLocalesFragment extends DashboardFragment
|
||||
InputMethodSubtype inputMethodSubtype) {
|
||||
Bundle arguments = new Bundle();
|
||||
arguments.putParcelable(
|
||||
NewKeyboardSettingsUtils.EXTRA_INPUT_DEVICE_IDENTIFIER, inputDeviceIdentifier);
|
||||
InputPeripheralsSettingsUtils.EXTRA_INPUT_DEVICE_IDENTIFIER,
|
||||
inputDeviceIdentifier);
|
||||
arguments.putParcelable(
|
||||
NewKeyboardSettingsUtils.EXTRA_INPUT_METHOD_INFO, inputMethodInfo);
|
||||
InputPeripheralsSettingsUtils.EXTRA_INPUT_METHOD_INFO, inputMethodInfo);
|
||||
arguments.putParcelable(
|
||||
NewKeyboardSettingsUtils.EXTRA_INPUT_METHOD_SUBTYPE, inputMethodSubtype);
|
||||
arguments.putInt(NewKeyboardSettingsUtils.EXTRA_USER_ID, userId);
|
||||
arguments.putCharSequence(NewKeyboardSettingsUtils.EXTRA_TITLE, subtypeLabel);
|
||||
InputPeripheralsSettingsUtils.EXTRA_INPUT_METHOD_SUBTYPE, inputMethodSubtype);
|
||||
arguments.putInt(InputPeripheralsSettingsUtils.EXTRA_USER_ID, userId);
|
||||
arguments.putCharSequence(InputPeripheralsSettingsUtils.EXTRA_TITLE, subtypeLabel);
|
||||
new SubSettingLauncher(mContext)
|
||||
.setSourceMetricsCategory(getMetricsCategory())
|
||||
.setDestination(NewKeyboardLayoutPickerFragment.class.getName())
|
||||
|
Reference in New Issue
Block a user