Change Input Settings UI flow.
1. Introduces new UI components as per the new flow 2. Temporarily disables components in the old flow that are to be replaced by the new flow. This is done so we can neatly revert to the old flow if there are issues with the new flow 3. AvailableVirtualKeyboardActivity now responds to android.settings.INPUT_METHOD_SETTINGS intents instead of InputMethodAndLanguageSettingsActivity Bug: 25752812 Change-Id: I728d7ee185827ed328c16cb7abce244557a26518
This commit is contained in:
@@ -157,12 +157,16 @@ public class InputMethodAndLanguageSettings extends SettingsPreferenceFragment
|
||||
startingIntent.getAction());
|
||||
if (mShowsOnlyFullImeAndKeyboardList) {
|
||||
getPreferenceScreen().removeAll();
|
||||
getPreferenceScreen().addPreference(mHardKeyboardCategory);
|
||||
if (mHardKeyboardCategory != null) {
|
||||
getPreferenceScreen().addPreference(mHardKeyboardCategory);
|
||||
}
|
||||
if (SHOW_INPUT_METHOD_SWITCHER_SETTINGS) {
|
||||
getPreferenceScreen().addPreference(mShowInputMethodSelectorPref);
|
||||
}
|
||||
mKeyboardSettingsCategory.removeAll();
|
||||
getPreferenceScreen().addPreference(mKeyboardSettingsCategory);
|
||||
if (mKeyboardSettingsCategory != null) {
|
||||
mKeyboardSettingsCategory.removeAll();
|
||||
getPreferenceScreen().addPreference(mKeyboardSettingsCategory);
|
||||
}
|
||||
}
|
||||
|
||||
// Build hard keyboard and game controller preference categories.
|
||||
@@ -376,6 +380,10 @@ public class InputMethodAndLanguageSettings extends SettingsPreferenceFragment
|
||||
}
|
||||
|
||||
private void updateInputMethodPreferenceViews() {
|
||||
if (mKeyboardSettingsCategory == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
synchronized (mInputMethodPreferenceList) {
|
||||
// Clear existing "InputMethodPreference"s
|
||||
for (final InputMethodPreference pref : mInputMethodPreferenceList) {
|
||||
@@ -510,6 +518,10 @@ public class InputMethodAndLanguageSettings extends SettingsPreferenceFragment
|
||||
}
|
||||
|
||||
private void updateHardKeyboards() {
|
||||
if (mHardKeyboardCategory == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
mHardKeyboardPreferenceList.clear();
|
||||
final int[] devices = InputDevice.getDeviceIds();
|
||||
for (int i = 0; i < devices.length; i++) {
|
||||
|
Reference in New Issue
Block a user