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

Commit 4be12ea1 authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

syncInputWindows for mouse events

Add back the syncInputWindows calls for mouse events, because there are
tests that rely on this behaviour (they might inject only a few events,
which is not very realistic, but we still have to support this).

Bug: 137072767
Bug: 138263890
Test: atest android.view.cts.HoverTest
Change-Id: I37b621bc6dc6a844ca86324962124bb06857b906
parent ed4820f0
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -7670,10 +7670,12 @@ public class WindowManagerService extends IWindowManager.Stub
            isDown = motionEvent.getAction() == MotionEvent.ACTION_DOWN;
            isDown = motionEvent.getAction() == MotionEvent.ACTION_DOWN;
            isUp = motionEvent.getAction() == MotionEvent.ACTION_UP;
            isUp = motionEvent.getAction() == MotionEvent.ACTION_UP;
        }
        }
        final boolean isMouseEvent = ev.getSource() == InputDevice.SOURCE_MOUSE;


        // For ACTION_DOWN, syncInputTransactions before injecting input.
        // For ACTION_DOWN, syncInputTransactions before injecting input.
        // For all mouse events, also sync before injecting.
        // For ACTION_UP, sync after injecting.
        // For ACTION_UP, sync after injecting.
        if (isDown) {
        if (isDown || isMouseEvent) {
            syncInputTransactions();
            syncInputTransactions();
        }
        }
        final boolean result =
        final boolean result =