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

Unverified Commit 570cf800 authored by LuK1337's avatar LuK1337 Committed by Michael Bestas
Browse files

SystemUIProxy: Add injectDoublePress()

Will be used by Trebuchet.

Change-Id: Iaee470680548cea5597ec84b77663683199603d2
parent 44c78434
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -113,6 +113,9 @@ interface ISystemUiProxy {
    /** Injects button long press. */
    /** Injects button long press. */
    oneway void injectLongPress(int keyCode) = 46;
    oneway void injectLongPress(int keyCode) = 46;


    /** Injects button press. */
    oneway void injectDoublePress(int keyCode) = 43;

    /** Notifies when taskbar status updated */
    /** Notifies when taskbar status updated */
    oneway void notifyTaskbarStatus(boolean visible, boolean stashed) = 47;
    oneway void notifyTaskbarStatus(boolean visible, boolean stashed) = 47;


+10 −0
Original line number Original line Diff line number Diff line
@@ -314,6 +314,16 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis
            });
            });
        }
        }


        @Override
        public void injectDoublePress(int keyCode) throws RemoteException {
            verifyCallerAndClearCallingIdentityPostMain("doublePressInjected", () -> {
                sendEvent(KeyEvent.ACTION_DOWN, keyCode);
                sendEvent(KeyEvent.ACTION_UP, keyCode);
                sendEvent(KeyEvent.ACTION_DOWN, keyCode);
                sendEvent(KeyEvent.ACTION_UP, keyCode);
            });
        }

        @Override
        @Override
        public void onImeSwitcherPressed() {
        public void onImeSwitcherPressed() {
            // TODO(b/204901476) We're intentionally using the default display for now since
            // TODO(b/204901476) We're intentionally using the default display for now since