Remove Language and Input duplicates

Change the keys in the Language and Input screen for the
gesture and tts-output settings so they can be disabled
in search. Then change the preference controllers to take
a key as input to avoid crashes on the other screens with
these settings.

Test: make RunSettingsRoboTests
Bug: 33701673
Change-Id: Ifeb2a2d34a3efded3f0a9ba02ac76fd6f8ffd087
Merged-In: I8bc0776131fcac5a6edf7e8271bc53252c2fc719
This commit is contained in:
Matthew Fritze
2017-04-11 16:35:48 -07:00
parent 3b2d98c714
commit b97a1bffa8
31 changed files with 204 additions and 92 deletions

View File

@@ -54,6 +54,8 @@ public class DisplaySettings extends DashboardFragment {
private static final String KEY_AUTO_BRIGHTNESS = "auto_brightness";
private static final String KEY_SCREEN_TIMEOUT = "screen_timeout";
private static final String KEY_PICK_UP = "gesture_pick_up_display_summary";
private static final String KEY_DOUBLE_TAP_SCREEN = "gesture_double_tap_screen_display_summary";
@Override
public int getMetricsCategory() {
@@ -100,9 +102,10 @@ public class DisplaySettings extends DashboardFragment {
controllers.add(new ScreenSaverPreferenceController(context));
AmbientDisplayConfiguration ambientDisplayConfig = new AmbientDisplayConfiguration(context);
controllers.add(new PickupGesturePreferenceController(
context, lifecycle, ambientDisplayConfig, UserHandle.myUserId()));
context, lifecycle, ambientDisplayConfig, UserHandle.myUserId(), KEY_PICK_UP));
controllers.add(new DoubleTapScreenPreferenceController(
context, lifecycle, ambientDisplayConfig, UserHandle.myUserId()));
context, lifecycle, ambientDisplayConfig, UserHandle.myUserId(),
KEY_DOUBLE_TAP_SCREEN));
controllers.add(new TapToWakePreferenceController(context));
controllers.add(new TimeoutPreferenceController(context, KEY_SCREEN_TIMEOUT));
controllers.add(new VrDisplayPreferenceController(context));