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

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

Merge "[M11n] Add missing defensive copies"

parents a4d9784d 7dbd24c1
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
@@ -760,10 +760,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,