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

Commit 9a4450ba authored by Keisuke Kuroyanagi's avatar Keisuke Kuroyanagi
Browse files

Add null check for MotionEvent#getDevice.

MotionEvent#getDevice can return null when the device is
unknown.

Change-Id: I902a96300307e3b2d3b324a2998e470254388e27
parent 742bd403
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -4191,7 +4191,10 @@ public final class ViewRootImpl implements ViewParent,

                    if (mPointerIconShape != pointerShape) {
                        mPointerIconShape = pointerShape;
                        event.getDevice().setPointerShape(pointerShape);
                        final InputDevice inputDevice = event.getDevice();
                        if (inputDevice != null) {
                            inputDevice.setPointerShape(pointerShape);
                        }
                    }
                } else if (event.getActionMasked() == MotionEvent.ACTION_HOVER_MOVE) {
                    mPointerIconShape = PointerIcon.STYLE_NOT_SPECIFIED;