Merge "Logically revert "Directly show the layout selection screen."" into pi-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
cb601396d4
@@ -55,7 +55,6 @@ public class KeyboardLayoutDialogFragment extends InstrumentedDialogFragment
|
||||
private int mInputDeviceId = -1;
|
||||
private InputManager mIm;
|
||||
private KeyboardLayoutAdapter mAdapter;
|
||||
private boolean mHasShownLayoutSelectionScreen;
|
||||
|
||||
public KeyboardLayoutDialogFragment() {
|
||||
}
|
||||
@@ -187,7 +186,6 @@ public class KeyboardLayoutDialogFragment extends InstrumentedDialogFragment
|
||||
dialog.getListView().setItemChecked(data.current, true);
|
||||
}
|
||||
updateSwitchHintVisibility();
|
||||
showSetupKeyboardLayoutsIfNecessary();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -222,17 +220,6 @@ public class KeyboardLayoutDialogFragment extends InstrumentedDialogFragment
|
||||
}
|
||||
}
|
||||
|
||||
private void showSetupKeyboardLayoutsIfNecessary() {
|
||||
AlertDialog dialog = (AlertDialog)getDialog();
|
||||
if (dialog != null
|
||||
&& mAdapter.getCount() == 1 && mAdapter.getItem(0) == null
|
||||
&& !mHasShownLayoutSelectionScreen) {
|
||||
mHasShownLayoutSelectionScreen = true;
|
||||
((OnSetupKeyboardLayoutsListener)getTargetFragment()).onSetupKeyboardLayouts(
|
||||
mInputDeviceIdentifier);
|
||||
}
|
||||
}
|
||||
|
||||
private static final class KeyboardLayoutAdapter extends ArrayAdapter<KeyboardLayout> {
|
||||
private final LayoutInflater mInflater;
|
||||
private int mCheckedItem = -1;
|
||||
|
@@ -187,14 +187,11 @@ public final class PhysicalKeyboardFragment extends SettingsPreferenceFragment
|
||||
}
|
||||
|
||||
private void showKeyboardLayoutDialog(InputDeviceIdentifier inputDeviceIdentifier) {
|
||||
KeyboardLayoutDialogFragment fragment = (KeyboardLayoutDialogFragment)
|
||||
getFragmentManager().findFragmentByTag("keyboardLayout");
|
||||
if (fragment == null) {
|
||||
fragment = new KeyboardLayoutDialogFragment(inputDeviceIdentifier);
|
||||
KeyboardLayoutDialogFragment fragment = new KeyboardLayoutDialogFragment(
|
||||
inputDeviceIdentifier);
|
||||
fragment.setTargetFragment(this, 0);
|
||||
fragment.show(getActivity().getFragmentManager(), "keyboardLayout");
|
||||
}
|
||||
}
|
||||
|
||||
private void registerShowVirtualKeyboardSettingsObserver() {
|
||||
unregisterShowVirtualKeyboardSettingsObserver();
|
||||
|
Reference in New Issue
Block a user