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.

Merge for: ag/2098173/

Test: make RunSettingsRoboTests
Bug: 33701673
Change-Id: I8bc0776131fcac5a6edf7e8271bc53252c2fc719
This commit is contained in:
Matthew Fritze
2017-04-11 16:35:48 -07:00
parent 803f0c96e8
commit 742467ec9f
32 changed files with 259 additions and 90 deletions

View File

@@ -45,11 +45,12 @@ public class SwipeToNotificationPreferenceControllerTest {
private Context mContext;
private SwipeToNotificationPreferenceController mController;
private static final String KEY_SWIPE_DOWN = "gesture_swipe_down_fingerprint";
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
mController = new SwipeToNotificationPreferenceController(mContext, null);
mController = new SwipeToNotificationPreferenceController(mContext, null, KEY_SWIPE_DOWN);
}
@Test
@@ -75,7 +76,7 @@ public class SwipeToNotificationPreferenceControllerTest {
// Set the setting to be enabled.
final Context context = ShadowApplication.getInstance().getApplicationContext();
Settings.System.putInt(context.getContentResolver(), SYSTEM_NAVIGATION_KEYS_ENABLED, 1);
mController = new SwipeToNotificationPreferenceController(context, null);
mController = new SwipeToNotificationPreferenceController(context, null, KEY_SWIPE_DOWN);
assertThat(mController.isSwitchPrefEnabled()).isTrue();
}
@@ -85,7 +86,7 @@ public class SwipeToNotificationPreferenceControllerTest {
// Set the setting to be disabled.
final Context context = ShadowApplication.getInstance().getApplicationContext();
Settings.System.putInt(context.getContentResolver(), SYSTEM_NAVIGATION_KEYS_ENABLED, 0);
mController = new SwipeToNotificationPreferenceController(context, null);
mController = new SwipeToNotificationPreferenceController(context, null, KEY_SWIPE_DOWN);
assertThat(mController.isSwitchPrefEnabled()).isFalse();
}