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

Commit 04d0657d authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

Stop calling InputMonitor::pilferPointers

This API is deprecated, and is about to be removed. To facilitate this,
we convert the existing usages to be calling InputManager.

Long term, the entire InputMonitor.java should be removed.

Clients should be using SPY windows instead.

Bug: 323450804
Test: none
Flag: EXEMPT refactor
Change-Id: I66d2088ee03954c3caf819c06b8528fc0f49822b
parent a79a54d8
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1551,7 +1551,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);
        }
@@ -1618,7 +1618,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 (mDesktopState.canEnterDesktopMode()) {
            if (!mInImmersiveMode && (relevantDecor == null
@@ -1632,7 +1632,8 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel,
        // Prevent status bar from reacting to a caption drag.
        if (mDesktopState.canEnterDesktopMode()) {
            if (mTransitionDragActive) {
                inputMonitor.pilferPointers();
                final InputManager inputManager = mContext.getSystemService(InputManager.class);
                inputManager.pilferPointers(inputChannelToken);
            }
        }
    }