Fix swipe for notification default should be on instead of off

Set default "ON" when we can not get
SWIPE_BOTTOM_TO_NOTIFICATION_ENABLED value.

Bug: 175084985

Test: manual check Settings > System > Gesture > Swipe for notifications
Test: manual check it is disabled after One-handed mode toggled on
Test: make RunSettingsRoboTests ROBOTEST_FILTER=\
"SwipeBottomToNotificationSettingsTest"
Test: make RunSettingsRoboTests ROBOTEST_FILTER=\
"SwipeBottomToNotificationPreferenceControllerTest"

Change-Id: I176ba1c0e18c5ed7d1582d380db6ec190b6e1dec
This commit is contained in:
Jason Chang
2020-12-11 00:28:57 +08:00
parent abb239f4a4
commit fc7fbdb8ae
2 changed files with 3 additions and 3 deletions

View File

@@ -76,7 +76,7 @@ public class SwipeBottomToNotificationPreferenceController extends TogglePrefere
@Override
public boolean isChecked() {
return Settings.Secure.getInt(mContext.getContentResolver(),
SWIPE_BOTTOM_TO_NOTIFICATION_ENABLED, OFF) == ON;
SWIPE_BOTTOM_TO_NOTIFICATION_ENABLED, ON) == ON;
}
@Override