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

Commit bf1439c5 authored by Jean-Baptiste Queru's avatar Jean-Baptiste Queru Committed by Android Code Review
Browse files

Merge "Preserve flags field of event passed to injectKeyEvent()"

parents e1de3f39 c6ded10d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -5488,12 +5488,13 @@ public class WindowManagerService extends IWindowManager.Stub
        int metaState = ev.getMetaState();
        int deviceId = ev.getDeviceId();
        int scancode = ev.getScanCode();
        int flags = ev.getFlags();

        if (eventTime == 0) eventTime = SystemClock.uptimeMillis();
        if (downTime == 0) downTime = eventTime;

        KeyEvent newEvent = new KeyEvent(downTime, eventTime, action, code, repeatCount, metaState,
                deviceId, scancode, KeyEvent.FLAG_FROM_SYSTEM);
                deviceId, scancode, flags | KeyEvent.FLAG_FROM_SYSTEM);

        final int pid = Binder.getCallingPid();
        final int uid = Binder.getCallingUid();