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

Commit 7dbd24c1 authored by Eugene Susla's avatar Eugene Susla
Browse files

[M11n] Add missing defensive copies

Fixes: 71502922
Test: Ensure attached bug no longer reproduces
Change-Id: Id0f6e92fab4f2472cc1c22d47249ec5bbba43b3b
parent dd312aba
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -40,12 +40,6 @@ final class GestureUtils {
        return (deltaTime >= timeout);
    }

    public static boolean isSamePointerContext(MotionEvent first, MotionEvent second) {
        return (first.getPointerIdBits() == second.getPointerIdBits()
                && first.getPointerId(first.getActionIndex())
                        == second.getPointerId(second.getActionIndex()));
    }

    /**
     * Determines whether a two pointer gesture is a dragging one.
     *
+2 −2
Original line number Diff line number Diff line
@@ -755,10 +755,10 @@ class MagnificationGestureHandler extends BaseEventStreamTransformation {
                int policyFlags) {
            if (event.getActionMasked() == ACTION_DOWN) {
                mPreLastDown = mLastDown;
                mLastDown = event;
                mLastDown = MotionEvent.obtain(event);
            } else if (event.getActionMasked() == ACTION_UP) {
                mPreLastUp = mLastUp;
                mLastUp = event;
                mLastUp = MotionEvent.obtain(event);
            }

            MotionEventInfo info = MotionEventInfo.obtain(event, rawEvent,