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

Commit dede7787 authored by Vaibhav Devmurari's avatar Vaibhav Devmurari
Browse files

Add flag APIs for customizable input gestures

Test: None
Bug: 365064144
Flag: EXEMPT internal  API only
Change-Id: Ifee3b25c69f77fa4cc413f37c787a53bd377bacd
parent dc9dcdd8
Loading
Loading
Loading
Loading
+16 −1
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ import static com.android.hardware.input.Flags.mouseSwapPrimaryButton;
import static com.android.hardware.input.Flags.touchpadTapDragging;
import static com.android.hardware.input.Flags.touchpadThreeFingerTapShortcut;
import static com.android.hardware.input.Flags.touchpadVisualizer;
import static com.android.hardware.input.Flags.useKeyGestureEventHandler;
import static com.android.input.flags.Flags.FLAG_KEYBOARD_REPEAT_KEYS;
import static com.android.input.flags.Flags.enableInputFilterRustImpl;
import static com.android.input.flags.Flags.keyboardRepeatKeys;
@@ -386,7 +387,7 @@ public class InputSettings {
     * @hide
     */
    public static boolean isTouchpadThreeFingerTapShortcutFeatureFlagEnabled() {
        return enableCustomizableInputGestures() && touchpadThreeFingerTapShortcut();
        return isCustomizableInputGesturesFeatureFlagEnabled() && touchpadThreeFingerTapShortcut();
    }

    /**
@@ -1132,4 +1133,18 @@ public class InputSettings {
                Settings.Secure.KEY_REPEAT_DELAY_MS, delayTimeMillis,
                UserHandle.USER_CURRENT);
    }

    /**
     * Whether "Customizable key gestures" feature flag is enabled.
     *
     * <p>
     * ‘Customizable key gestures’ is a feature which allows users to customize key based
     * shortcuts on the physical keyboard.
     * </p>
     *
     * @hide
     */
    public static boolean isCustomizableInputGesturesFeatureFlagEnabled() {
        return enableCustomizableInputGestures() && useKeyGestureEventHandler();
    }
}