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

Commit 3a59cb80 authored by Michael Wright's avatar Michael Wright Committed by Android (Google) Code Review
Browse files

Merge "Fix possible NPE in PointerLocationView"

parents c31687eb 2f1cd7e6
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -549,8 +549,9 @@ public class PointerLocationView extends View implements InputDeviceListener {

            final PointerState ps = mPointers.get(id);
            ps.mCurDown = true;
            ps.mHasBoundingBox = (InputDevice.getDevice(event.getDeviceId()).
                    getMotionRange(MotionEvent.AXIS_GENERIC_1) != null);
            InputDevice device = InputDevice.getDevice(event.getDeviceId());
            ps.mHasBoundingBox = device != null &&
                    device.getMotionRange(MotionEvent.AXIS_GENERIC_1) != null;
        }

        final int NI = event.getPointerCount();