Merge "2/ Set Swipe bottom for notification OFF by default" into sc-dev am: 9f046e55b6
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/13856783 Change-Id: I48372fe8a551f218a6636e381b47c823dcb5b5ee
This commit is contained in:
@@ -76,7 +76,7 @@ public class SwipeBottomToNotificationPreferenceController extends TogglePrefere
|
||||
@Override
|
||||
public boolean isChecked() {
|
||||
return Settings.Secure.getInt(mContext.getContentResolver(),
|
||||
SWIPE_BOTTOM_TO_NOTIFICATION_ENABLED, ON) == ON;
|
||||
SWIPE_BOTTOM_TO_NOTIFICATION_ENABLED, OFF) == ON;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -58,7 +58,7 @@ public class SwipeBottomToNotificationPreferenceControllerTest {
|
||||
mController.setChecked(true);
|
||||
|
||||
assertThat(Settings.Secure.getInt(mContext.getContentResolver(),
|
||||
SWIPE_BOTTOM_TO_NOTIFICATION_ENABLED, 1)).isEqualTo(1);
|
||||
SWIPE_BOTTOM_TO_NOTIFICATION_ENABLED, 0)).isEqualTo(1);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -66,7 +66,7 @@ public class SwipeBottomToNotificationPreferenceControllerTest {
|
||||
mController.setChecked(false);
|
||||
|
||||
assertThat(Settings.Secure.getInt(mContext.getContentResolver(),
|
||||
SWIPE_BOTTOM_TO_NOTIFICATION_ENABLED, 1)).isEqualTo(0);
|
||||
SWIPE_BOTTOM_TO_NOTIFICATION_ENABLED, 0)).isEqualTo(0);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -109,4 +109,13 @@ public class SwipeBottomToNotificationPreferenceControllerTest {
|
||||
assertThat(mController.getSummary()).isEqualTo(
|
||||
mContext.getText(R.string.gesture_setting_off));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getDefaultConfig_returnsOffState() {
|
||||
SystemProperties.set(OneHandedEnablePreferenceController.SUPPORT_ONE_HANDED_MODE, "false");
|
||||
Settings.Secure.resetToDefaults(mContext.getContentResolver(),
|
||||
Settings.Secure.ONE_HANDED_MODE_ENABLED);
|
||||
|
||||
assertThat(mController.isChecked()).isFalse();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user