From 858bda81f1d91e1854ce0322179351cdcca8c845 Mon Sep 17 00:00:00 2001 From: Jason Chang Date: Fri, 12 Mar 2021 17:26:42 +0800 Subject: [PATCH] Fix refresh in Gestures, not reflecting the changes after toggling on/off one-handed mode 1) Remove disabling on swipe down notification. 2) Update to align asset with One-Handed mode temporarily. 3) Change some states when toggle on/off and align with One-Handed mode. 4) Set temporary asset style to "centerInside" to avoid image corrupted problem when device rotate. 5) Add new string on Swipe down notification toggle switch. Bug: 177679988 Bug: 181970213 Test: manual verified on Settings > System > Gesture page Test: make RunSettingsRoboTests ROBOTEST_FILTER= "com.android.settings.gestures.OneHandedSettingsTest" Test: make RunSettingsRoboTests ROBOTEST_FILTER= "com.android.settings.gestures .OneHandedAppTapsExitPreferenceControllerTest" Test: make RunSettingsRoboTests ROBOTEST_FILTER= "com.android.settings.gestures .OneHandedEnablePreferenceControllerTest" Test: make RunSettingsRoboTests ROBOTEST_FILTER= "com.android.settings.gestures .OneHandedTimeoutPreferenceControllerTest" Test: make RunSettingsRoboTests ROBOTEST_FILTER= "com.android.settings.gestures.OneHandedSettingsUtilsTest" Test: make RunSettingsRoboTests ROBOTEST_FILTER= "com.android.settings.gestures.SwipeBottomToNotificationPreferenceControllerTest" Test: make RunSettingsRoboTests ROBOTEST_FILTER= "com.android.settings.gestures.SwipeBottomToNotificationSettingsTest" Change-Id: Ifd2346a7694323d21eb424891987c8317847e7c5 --- res/layout/one_handed_header.xml | 2 +- res/values/strings.xml | 4 +- .../swipe_bottom_to_notification_settings.xml | 12 ++--- .../OneHandedEnablePreferenceController.java | 6 +-- .../settings/gestures/OneHandedSettings.java | 4 +- .../gestures/OneHandedSettingsUtils.java | 32 +++++++++++++ ...tomToNotificationPreferenceController.java | 31 +++---------- .../SwipeBottomToNotificationSettings.java | 6 ++- ...eHandedEnablePreferenceControllerTest.java | 6 ++- .../gestures/OneHandedSettingsTest.java | 4 +- ...oNotificationPreferenceControllerTest.java | 45 +++++++------------ ...SwipeBottomToNotificationSettingsTest.java | 17 +++---- 12 files changed, 85 insertions(+), 84 deletions(-) diff --git a/res/layout/one_handed_header.xml b/res/layout/one_handed_header.xml index 2104e409a93..3fa81837985 100644 --- a/res/layout/one_handed_header.xml +++ b/res/layout/one_handed_header.xml @@ -21,7 +21,7 @@ diff --git a/res/values/strings.xml b/res/values/strings.xml index 2369864fac8..a7452de4201 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -11280,8 +11280,8 @@ Swipe for notifications - - Swipe down on the bottom edge of the screen to show your notifications + + Swipe down on the bottom edge of the screen to show your notifications.\nYou can\'t use one-handed mode when this feature is turned on. One-Handed mode diff --git a/res/xml/swipe_bottom_to_notification_settings.xml b/res/xml/swipe_bottom_to_notification_settings.xml index bec774bd84a..2a75c147e75 100644 --- a/res/xml/swipe_bottom_to_notification_settings.xml +++ b/res/xml/swipe_bottom_to_notification_settings.xml @@ -20,11 +20,13 @@ xmlns:settings="http://schemas.android.com/apk/res-auto" android:title="@string/swipe_bottom_to_notifications_title"> - +