Enable one-handed mode gestural in QuickStep

Handling swipe-down/swipe-up gestural in device bottom area
for one-handed mode

1) The regsion is larger than gesture navigationbar view
2) One handed gestural in quickstep only active on NO_BUTTON, TWO_BUTTONS mode
3) One handed gestural only support on portrait mode

Bug: 150747547
Bug: 154189137
Bug: 156988988

Test: make and install
Test: manual enable one handed mode and swipe down to trigger
Test: manual start one handed and rotate device

Change-Id: I7b2447bfb2fe4082c95176b62934b98077b84920
(cherry picked from commit 7d375e31fe)
This commit is contained in:
Tony Huang authored and Winson Chung committed 2020-07-21 09:59:43 -07:00
1 parent 6f86e5078f
commit a0dfbff96a
9 files changed
+254 -5

No files matched your search

@@ -29,6 +29,8 @@ public class SecureSettingsObserver extends ContentObserver {
/** Hidden field Settings.Secure.NOTIFICATION_BADGING */
public static final String NOTIFICATION_BADGING = "notification_badging";
/** Hidden field Settings.Secure.ONE_HANDED_MODE_ENABLED */
public static final String ONE_HANDED_ENABLED = "one_handed_mode_enabled";
private final ContentResolver mResolver;
private final String mKeySetting;
@@ -79,4 +81,10 @@ public class SecureSettingsObserver extends ContentObserver {
return new SecureSettingsObserver(
context.getContentResolver(), listener, NOTIFICATION_BADGING, 1);
}
public static SecureSettingsObserver newOneHandedSettingsObserver(Context context,
OnChangeListener listener) {
return new SecureSettingsObserver(
context.getContentResolver(), listener, ONE_HANDED_ENABLED, 1);
}
}