Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2e24cc7a authored by jasonwshsu's avatar jasonwshsu
Browse files

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
parent b0472390
Loading
Loading
Loading
Loading
+13 −2
Original line number Diff line number Diff line
@@ -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.
         * <ul>
         *    <li> 0 = button in navigation bar </li>
         *    <li> 1 = button floating on the display </li>
         *    <li> 2 = button using gesture to trigger </li>
         * </ul>
         *
         * @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.
         * <ul>
+1 −1
Original line number Diff line number Diff line
@@ -277,7 +277,7 @@ public class SecureSettingsValidators {
        VALIDATORS.put(Secure.ACCESSIBILITY_BUTTON_MODE,
                new InclusiveIntegerRangeValidator(
                        Secure.ACCESSIBILITY_BUTTON_MODE_NAVIGATION_BAR,
                        Secure.ACCESSIBILITY_BUTTON_MODE_FLOATING_MENU));
                        Secure.ACCESSIBILITY_BUTTON_MODE_GESTURE));
        VALIDATORS.put(Secure.ACCESSIBILITY_FLOATING_MENU_SIZE,
                new DiscreteValueValidator(new String[] {"0", "1"}));
        VALIDATORS.put(Secure.ACCESSIBILITY_FLOATING_MENU_ICON_TYPE,