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

Commit 01105b07 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Use desktop only gesture type for Action+Ctrl+W" into main

parents 6cede5e5 0aeed081
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -133,6 +133,7 @@ public final class KeyGestureEvent {
    public static final int KEY_GESTURE_TYPE_SWITCH_TO_NEXT_DESK = 78;
    public static final int KEY_GESTURE_TYPE_TOGGLE_QUICK_SETTINGS_PANEL = 79;
    public static final int KEY_GESTURE_TYPE_QUIT_FOCUSED_TASK = 80;
    public static final int KEY_GESTURE_TYPE_QUIT_FOCUSED_DESKTOP_TASK = 81;

    public static final int FLAG_CANCELLED = 1 << 0;
    public static final int FLAG_LONG_PRESS = 1 << 1;
@@ -228,6 +229,7 @@ public final class KeyGestureEvent {
            KEY_GESTURE_TYPE_SWITCH_TO_NEXT_DESK,
            KEY_GESTURE_TYPE_TOGGLE_QUICK_SETTINGS_PANEL,
            KEY_GESTURE_TYPE_QUIT_FOCUSED_TASK,
            KEY_GESTURE_TYPE_QUIT_FOCUSED_DESKTOP_TASK,
    })
    @Retention(RetentionPolicy.SOURCE)
    public @interface KeyGestureType {
@@ -828,6 +830,8 @@ public final class KeyGestureEvent {
                return "KEY_GESTURE_TYPE_TOGGLE_QUICK_SETTINGS_PANEL";
            case KEY_GESTURE_TYPE_QUIT_FOCUSED_TASK:
                return "KEY_GESTURE_TYPE_QUIT_FOCUSED_TASK";
            case KEY_GESTURE_TYPE_QUIT_FOCUSED_DESKTOP_TASK:
                return "KEY_GESTURE_TYPE_QUIT_FOCUSED_DESKTOP_TASK";
            default:
                return Integer.toHexString(value);
        }
+1 −1
Original line number Diff line number Diff line
@@ -323,7 +323,7 @@ final class InputGestureManager {
                    createKeyGesture(
                            KeyEvent.KEYCODE_W,
                            KeyEvent.META_META_ON | KeyEvent.META_CTRL_ON,
                            KeyGestureEvent.KEY_GESTURE_TYPE_QUIT_FOCUSED_TASK,
                            KeyGestureEvent.KEY_GESTURE_TYPE_QUIT_FOCUSED_DESKTOP_TASK,
                            /* allowCaptureByFocusedWindow = */false
                    ));
        }
+2 −2
Original line number Diff line number Diff line
@@ -166,13 +166,13 @@ object KeyGestureTestData {
                intArrayOf(KeyGestureEvent.ACTION_GESTURE_COMPLETE),
            ),
            KeyGestureData(
                "META + CTRL + W -> Quit focused task",
                "META + CTRL + W -> Quit focused desktop task",
                intArrayOf(
                    KeyEvent.KEYCODE_META_LEFT,
                    KeyEvent.KEYCODE_CTRL_LEFT,
                    KeyEvent.KEYCODE_W,
                ),
                KeyGestureEvent.KEY_GESTURE_TYPE_QUIT_FOCUSED_TASK,
                KeyGestureEvent.KEY_GESTURE_TYPE_QUIT_FOCUSED_DESKTOP_TASK,
                intArrayOf(KeyEvent.KEYCODE_W),
                KeyEvent.META_META_ON or KeyEvent.META_CTRL_ON,
                intArrayOf(KeyGestureEvent.ACTION_GESTURE_COMPLETE),