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:
@@ -47,11 +47,12 @@ public class DoubleTapPowerPreferenceControllerTest {
|
||||
@Mock(answer = Answers.RETURNS_DEEP_STUBS)
|
||||
private PreferenceScreen mScreen;
|
||||
private DoubleTapPowerPreferenceController mController;
|
||||
private static final String KEY_DOUBLE_TAP_POWER = "gesture_double_tap_power";
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
MockitoAnnotations.initMocks(this);
|
||||
mController = new DoubleTapPowerPreferenceController(mContext, null);
|
||||
mController = new DoubleTapPowerPreferenceController(mContext, null, KEY_DOUBLE_TAP_POWER);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -78,7 +79,7 @@ public class DoubleTapPowerPreferenceControllerTest {
|
||||
final Context context = ShadowApplication.getInstance().getApplicationContext();
|
||||
Settings.System.putInt(context.getContentResolver(),
|
||||
CAMERA_DOUBLE_TAP_POWER_GESTURE_DISABLED, 0);
|
||||
mController = new DoubleTapPowerPreferenceController(context, null);
|
||||
mController = new DoubleTapPowerPreferenceController(context, null, KEY_DOUBLE_TAP_POWER);
|
||||
|
||||
assertThat(mController.isSwitchPrefEnabled()).isTrue();
|
||||
}
|
||||
@@ -89,7 +90,7 @@ public class DoubleTapPowerPreferenceControllerTest {
|
||||
final Context context = ShadowApplication.getInstance().getApplicationContext();
|
||||
Settings.System.putInt(context.getContentResolver(),
|
||||
CAMERA_DOUBLE_TAP_POWER_GESTURE_DISABLED, 1);
|
||||
mController = new DoubleTapPowerPreferenceController(context, null);
|
||||
mController = new DoubleTapPowerPreferenceController(context, null, KEY_DOUBLE_TAP_POWER);
|
||||
|
||||
assertThat(mController.isSwitchPrefEnabled()).isFalse();
|
||||
}
|
||||
|
Reference in New Issue
Block a user