From 2e24cc7a8762195062ede35533f02fe6495e7750 Mon Sep 17 00:00:00 2001 From: jasonwshsu Date: Fri, 11 Jun 2021 13:02:41 +0800 Subject: [PATCH] Add a supported type 'gesture' under ACCESSIBILITY_BUTTON_MODE Root cause: From the user feedback, accessibiltiy gesture has more benifits than floating accessibility button especially to low vision users. Solution: Bring back accessibility gesture to be one of the options of the accessibility button. Bug: 190563948 Test: install new SettingsProvider.apk & adb reboot & manual test Change-Id: I59952c744cddfbdc01b906d39b2681858f0bb2ea --- core/java/android/provider/Settings.java | 15 +++++++++++++-- .../validators/SecureSettingsValidators.java | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index a6332d76ca65f..c4f7268b20a62 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -9972,15 +9972,18 @@ public final class Settings { /** * Controls the accessibility button mode. System will force-set the value to {@link - * #ACCESSIBILITY_BUTTON_MODE_FLOATING_MENU} if {@link #NAVIGATION_MODE} is fully - * gestural. + * #ACCESSIBILITY_BUTTON_MODE_GESTURE} if {@link #NAVIGATION_MODE} is button; force-set the + * value to {@link ACCESSIBILITY_BUTTON_MODE_NAVIGATION_BAR} if {@link #NAVIGATION_MODE} is + * gestural; otherwise, remain the option. * * * @see #ACCESSIBILITY_BUTTON_MODE_NAVIGATION_BAR * @see #ACCESSIBILITY_BUTTON_MODE_FLOATING_MENU + * @see #ACCESSIBILITY_BUTTON_MODE_GESTURE * @hide */ public static final String ACCESSIBILITY_BUTTON_MODE = @@ -10002,6 +10005,14 @@ public final class Settings { */ public static final int ACCESSIBILITY_BUTTON_MODE_FLOATING_MENU = 0x1; + /** + * Accessibility button mode value that specifying the accessibility service or feature to + * be toggled via the gesture. + * + * @hide + */ + public static final int ACCESSIBILITY_BUTTON_MODE_GESTURE = 0x2; + /** * The size of the accessibility floating menu. *