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

Commit dffbb4db authored by Mitsuru Oshima's avatar Mitsuru Oshima Committed by The Android Open Source Project
Browse files

AI 148024: fix NPE when there is no history

Automated import of CL 148024
parent 8169daed
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -225,6 +225,7 @@ public final class MotionEvent implements Parcelable {
            mSize *= scale;
            mXPrecision *= scale;
            mYPrecision *= scale;
            if (mHistory != null) {
                float[] history = mHistory;
                int length = history.length;
                for (int i = 0; i < length; i++) {
@@ -232,6 +233,7 @@ public final class MotionEvent implements Parcelable {
                }
            }
        }
    }

    /**
     * Create a new MotionEvent, copying from an existing one.