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

Commit 6dee7547 authored by Marcello Galhardo's avatar Marcello Galhardo Committed by Android (Google) Code Review
Browse files

Merge "Dispatch Stylus Key Events to System UI"

parents 8178dc20 47c4941e
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -4300,9 +4300,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
            case KeyEvent.KEYCODE_DEMO_APP_3:
            case KeyEvent.KEYCODE_DEMO_APP_4: {
                // TODO(b/254604589): Dispatch KeyEvent to System UI.
                if (!mStylusButtonsDisabled) {
                sendSystemKeyToStatusBarAsync(keyCode);
                }

                // Just drop if keys are not intercepted for direct key.
                result &= ~ACTION_PASS_TO_USER;
@@ -4312,7 +4310,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
            case KeyEvent.KEYCODE_STYLUS_BUTTON_SECONDARY:
            case KeyEvent.KEYCODE_STYLUS_BUTTON_TERTIARY:
            case KeyEvent.KEYCODE_STYLUS_BUTTON_TAIL: {
                // TODO(go/android-stylus-buttons): Handle stylus button presses.
                if (!mStylusButtonsDisabled) {
                    sendSystemKeyToStatusBarAsync(keyCode);
                }
                result &= ~ACTION_PASS_TO_USER;
                break;
            }