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

Commit 0f7868f9 authored by Pat Manning's avatar Pat Manning Committed by Android (Google) Code Review
Browse files

Merge "Add Settings for three finger tap customization" into main

parents b1ae00df 6e936b85
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -522,8 +522,11 @@ public class InputSettings {
     * @hide
     */
    public static boolean useTouchpadThreeFingerTapShortcut(@NonNull Context context) {
        // TODO(b/365063048): determine whether to enable the shortcut based on the settings.
        return isTouchpadThreeFingerTapShortcutFeatureFlagEnabled();
        int customizedShortcut = Settings.System.getIntForUser(context.getContentResolver(),
                Settings.System.TOUCHPAD_THREE_FINGER_TAP_CUSTOMIZATION,
                KeyGestureEvent.KEY_GESTURE_TYPE_UNSPECIFIED, UserHandle.USER_CURRENT);
        return customizedShortcut != KeyGestureEvent.KEY_GESTURE_TYPE_UNSPECIFIED
                && isTouchpadThreeFingerTapShortcutFeatureFlagEnabled();
    }

    /**
+8 −0
Original line number Diff line number Diff line
@@ -6270,6 +6270,14 @@ public final class Settings {
         */
        public static final String TOUCHPAD_TAP_DRAGGING = "touchpad_tap_dragging";
        /**
         * Whether to enable three finger tap customization on touchpads.
         *
         * @hide
         */
        public static final String TOUCHPAD_THREE_FINGER_TAP_CUSTOMIZATION =
                "touchpad_three_finger_tap_customization";
        /**
         * Whether to enable a right-click zone on touchpads.
         *
+1 −0
Original line number Diff line number Diff line
@@ -217,6 +217,7 @@ message SystemSettingsProto {
        optional SettingProto right_click_zone = 3 [ (android.privacy).dest = DEST_AUTOMATIC ];
        optional SettingProto tap_to_click = 4 [ (android.privacy).dest = DEST_AUTOMATIC ];
        optional SettingProto tap_dragging = 5 [ (android.privacy).dest = DEST_AUTOMATIC ];
        optional SettingProto three_finger_tap_customization = 6 [ (android.privacy).dest = DEST_AUTOMATIC ];
    }
    optional Touchpad touchpad = 36;

+1 −0
Original line number Diff line number Diff line
@@ -78,6 +78,7 @@ public class SystemSettings {
                Settings.System.SHOW_WEB_SUGGESTIONS,
                Settings.System.SIP_CALL_OPTIONS,
                Settings.System.SIP_RECEIVE_CALLS,
                Settings.System.TOUCHPAD_THREE_FINGER_TAP_CUSTOMIZATION,
                Settings.System.POINTER_SPEED,
                Settings.System.POINTER_FILL_STYLE,
                Settings.System.POINTER_STROKE_STYLE,
+2 −0
Original line number Diff line number Diff line
@@ -213,6 +213,8 @@ public class SystemSettingsValidators {
        VALIDATORS.put(System.SIP_ADDRESS_ONLY, BOOLEAN_VALIDATOR);
        VALIDATORS.put(System.SIP_ASK_ME_EACH_TIME, BOOLEAN_VALIDATOR);
        VALIDATORS.put(System.POINTER_SPEED, new InclusiveFloatRangeValidator(-7, 7));
        VALIDATORS.put(System.TOUCHPAD_THREE_FINGER_TAP_CUSTOMIZATION,
                NON_NEGATIVE_INTEGER_VALIDATOR);
        VALIDATORS.put(System.POINTER_FILL_STYLE,
                new InclusiveIntegerRangeValidator(POINTER_ICON_VECTOR_STYLE_FILL_BEGIN,
                        POINTER_ICON_VECTOR_STYLE_FILL_END));
Loading