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

Unverified Commit 0b9cb008 authored by LuK1337's avatar LuK1337 Committed by Michael Bestas
Browse files

SystemUIProxy: Add injectPress()

Will be used by Trebuchet.

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

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

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

+8 −0
Original line number Diff line number Diff line
@@ -328,6 +328,14 @@ public class LauncherProxyService implements CallbackController<LauncherProxyLis
            });
        }

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

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