Loading src/com/android/settings/inputmethod/NewKeyboardLayoutEnabledLocalesFragment.java +7 −1 Original line number Diff line number Diff line Loading @@ -105,8 +105,13 @@ public class NewKeyboardLayoutEnabledLocalesFragment extends DashboardFragment public void onActivityCreated(final Bundle icicle) { super.onActivityCreated(icicle); Bundle arguments = getArguments(); if (arguments == null) { Log.e(TAG, "Arguments should not be null"); return; } mInputDeviceIdentifier = arguments.getParcelable(NewKeyboardSettingsUtils.EXTRA_INPUT_DEVICE_IDENTIFIER); arguments.getParcelable(NewKeyboardSettingsUtils.EXTRA_INPUT_DEVICE_IDENTIFIER, InputDeviceIdentifier.class); if (mInputDeviceIdentifier == null) { Log.e(TAG, "The inputDeviceIdentifier should not be null"); return; Loading @@ -128,6 +133,7 @@ public class NewKeyboardLayoutEnabledLocalesFragment extends DashboardFragment InputDevice inputDevice = NewKeyboardSettingsUtils.getInputDevice(mIm, mInputDeviceIdentifier); if (inputDevice == null) { Log.e(TAG, "Unable to start: input device is null"); getActivity().finish(); return; } Loading src/com/android/settings/inputmethod/PhysicalKeyboardFragment.java +6 −3 Original line number Diff line number Diff line Loading @@ -151,7 +151,8 @@ public final class PhysicalKeyboardFragment extends SettingsPreferenceFragment mKeyboardA11yCategory.removePreference(mAccessibilityStickyKeys); } InputDeviceIdentifier inputDeviceIdentifier = activity.getIntent().getParcelableExtra( KeyboardLayoutPickerFragment.EXTRA_INPUT_DEVICE_IDENTIFIER); KeyboardLayoutPickerFragment.EXTRA_INPUT_DEVICE_IDENTIFIER, InputDeviceIdentifier.class); int intentFromWhere = activity.getIntent().getIntExtra(android.provider.Settings.EXTRA_ENTRYPOINT, -1); if (intentFromWhere != -1) { Loading @@ -168,7 +169,8 @@ public final class PhysicalKeyboardFragment extends SettingsPreferenceFragment } private static boolean isAutoSelection(Bundle bundle, InputDeviceIdentifier identifier) { if (bundle != null && bundle.getParcelable(EXTRA_AUTO_SELECTION) != null) { if (bundle != null && bundle.getParcelable(EXTRA_AUTO_SELECTION, InputDeviceIdentifier.class) != null) { return false; } return identifier != null; Loading Loading @@ -446,7 +448,8 @@ public final class PhysicalKeyboardFragment extends SettingsPreferenceFragment if (mIntentWaitingForResult != null) { InputDeviceIdentifier inputDeviceIdentifier = mIntentWaitingForResult .getParcelableExtra(KeyboardLayoutPickerFragment.EXTRA_INPUT_DEVICE_IDENTIFIER); .getParcelableExtra(KeyboardLayoutPickerFragment.EXTRA_INPUT_DEVICE_IDENTIFIER, InputDeviceIdentifier.class); mIntentWaitingForResult = null; showKeyboardLayoutDialog(inputDeviceIdentifier); } Loading Loading
src/com/android/settings/inputmethod/NewKeyboardLayoutEnabledLocalesFragment.java +7 −1 Original line number Diff line number Diff line Loading @@ -105,8 +105,13 @@ public class NewKeyboardLayoutEnabledLocalesFragment extends DashboardFragment public void onActivityCreated(final Bundle icicle) { super.onActivityCreated(icicle); Bundle arguments = getArguments(); if (arguments == null) { Log.e(TAG, "Arguments should not be null"); return; } mInputDeviceIdentifier = arguments.getParcelable(NewKeyboardSettingsUtils.EXTRA_INPUT_DEVICE_IDENTIFIER); arguments.getParcelable(NewKeyboardSettingsUtils.EXTRA_INPUT_DEVICE_IDENTIFIER, InputDeviceIdentifier.class); if (mInputDeviceIdentifier == null) { Log.e(TAG, "The inputDeviceIdentifier should not be null"); return; Loading @@ -128,6 +133,7 @@ public class NewKeyboardLayoutEnabledLocalesFragment extends DashboardFragment InputDevice inputDevice = NewKeyboardSettingsUtils.getInputDevice(mIm, mInputDeviceIdentifier); if (inputDevice == null) { Log.e(TAG, "Unable to start: input device is null"); getActivity().finish(); return; } Loading
src/com/android/settings/inputmethod/PhysicalKeyboardFragment.java +6 −3 Original line number Diff line number Diff line Loading @@ -151,7 +151,8 @@ public final class PhysicalKeyboardFragment extends SettingsPreferenceFragment mKeyboardA11yCategory.removePreference(mAccessibilityStickyKeys); } InputDeviceIdentifier inputDeviceIdentifier = activity.getIntent().getParcelableExtra( KeyboardLayoutPickerFragment.EXTRA_INPUT_DEVICE_IDENTIFIER); KeyboardLayoutPickerFragment.EXTRA_INPUT_DEVICE_IDENTIFIER, InputDeviceIdentifier.class); int intentFromWhere = activity.getIntent().getIntExtra(android.provider.Settings.EXTRA_ENTRYPOINT, -1); if (intentFromWhere != -1) { Loading @@ -168,7 +169,8 @@ public final class PhysicalKeyboardFragment extends SettingsPreferenceFragment } private static boolean isAutoSelection(Bundle bundle, InputDeviceIdentifier identifier) { if (bundle != null && bundle.getParcelable(EXTRA_AUTO_SELECTION) != null) { if (bundle != null && bundle.getParcelable(EXTRA_AUTO_SELECTION, InputDeviceIdentifier.class) != null) { return false; } return identifier != null; Loading Loading @@ -446,7 +448,8 @@ public final class PhysicalKeyboardFragment extends SettingsPreferenceFragment if (mIntentWaitingForResult != null) { InputDeviceIdentifier inputDeviceIdentifier = mIntentWaitingForResult .getParcelableExtra(KeyboardLayoutPickerFragment.EXTRA_INPUT_DEVICE_IDENTIFIER); .getParcelableExtra(KeyboardLayoutPickerFragment.EXTRA_INPUT_DEVICE_IDENTIFIER, InputDeviceIdentifier.class); mIntentWaitingForResult = null; showKeyboardLayoutDialog(inputDeviceIdentifier); } Loading