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
This commit is contained in:
Jason Chang
2021-03-12 17:26:42 +08:00
parent 59aa4f9cb1
commit 858bda81f1
12 changed files with 85 additions and 84 deletions

View File

@@ -18,7 +18,6 @@ package com.android.settings.gestures;
import android.app.settings.SettingsEnums;
import android.content.Context;
import android.os.SystemProperties;
import com.android.settings.R;
import com.android.settings.dashboard.DashboardFragment;
@@ -52,8 +51,7 @@ public class OneHandedSettings extends DashboardFragment {
new BaseSearchIndexProvider(R.xml.one_handed_settings) {
@Override
protected boolean isPageSearchEnabled(Context context) {
return SystemProperties.getBoolean(
OneHandedEnablePreferenceController.SUPPORT_ONE_HANDED_MODE, false);
return OneHandedSettingsUtils.isSupportOneHandedMode();
}
};
}