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

Commit 278958e9 authored by Tony Wickham's avatar Tony Wickham Committed by Android (Google) Code Review
Browse files

Merge "Always cancel forwarding on ACTION_UP or ACTION_CANCEL." into ub-launcher3-calgary

parents a42b2830 37a759a9
Loading
Loading
Loading
Loading
+5 −6
Original line number Original line Diff line number Diff line
@@ -218,8 +218,12 @@ public class ShortcutsContainerListener implements View.OnTouchListener,
        if (dst == null) {
        if (dst == null) {
            return false;
            return false;
        }
        }
        // Always cancel forwarding when the touch stream ends.
        final int action = srcEvent.getActionMasked();
        final boolean keepForwarding = action != MotionEvent.ACTION_UP
                && action != MotionEvent.ACTION_CANCEL;
        if (!dst.isLaidOut()) {
        if (!dst.isLaidOut()) {
            return true;
            return keepForwarding;
        }
        }


        // Convert event to destination-local coordinates.
        // Convert event to destination-local coordinates.
@@ -236,11 +240,6 @@ public class ShortcutsContainerListener implements View.OnTouchListener,
        final boolean handled = dst.onForwardedEvent(dstEvent, mActivePointerId, mTouchDown);
        final boolean handled = dst.onForwardedEvent(dstEvent, mActivePointerId, mTouchDown);
        dstEvent.recycle();
        dstEvent.recycle();


        // Always cancel forwarding when the touch stream ends.
        final int action = srcEvent.getActionMasked();
        final boolean keepForwarding = action != MotionEvent.ACTION_UP
                && action != MotionEvent.ACTION_CANCEL;

        return handled && keepForwarding;
        return handled && keepForwarding;
    }
    }