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

Commit d14a67ae authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Stop calling InputMonitor::pilferPointers" into main

parents 6391bd4b 04d0657d
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1548,7 +1548,7 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel,
            if (event instanceof MotionEvent) {
                handled = true;
                DesktopModeWindowDecorViewModel.this
                        .handleReceivedMotionEvent((MotionEvent) event, mInputMonitor);
                        .handleReceivedMotionEvent((MotionEvent) event, getToken());
            }
            finishInputEvent(event, handled);
        }
@@ -1615,7 +1615,7 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel,
     *
     * @param ev the {@link MotionEvent} received by {@link EventReceiver}
     */
    private void handleReceivedMotionEvent(MotionEvent ev, InputMonitor inputMonitor) {
    private void handleReceivedMotionEvent(MotionEvent ev, IBinder inputChannelToken) {
        final DesktopModeWindowDecoration relevantDecor = getRelevantWindowDecor(ev);
        if (mShellDesktopState.canEnterDesktopMode()) {
            if (!mInImmersiveMode && (relevantDecor == null
@@ -1629,7 +1629,8 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel,
        // Prevent status bar from reacting to a caption drag.
        if (mShellDesktopState.canEnterDesktopMode()) {
            if (mTransitionDragActive) {
                inputMonitor.pilferPointers();
                final InputManager inputManager = mContext.getSystemService(InputManager.class);
                inputManager.pilferPointers(inputChannelToken);
            }
        }
    }