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

Commit df42455b authored by Winson Chung's avatar Winson Chung
Browse files

Adding check to ensure device exists before setting pointer type.

Bug: 35917066
Test: Just a null check
Change-Id: If4c0e7a74c51cea12b831042d48a6d01e3ae5c84
parent 1e92e7fb
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -160,7 +160,10 @@ public class RecentsViewTouchHandler {
        EventBus.getDefault().send(new DragStartInitializeDropTargetsEvent(event.task,
                event.taskView, this));
        if (mDeviceId != -1) {
            InputDevice.getDevice(mDeviceId).setPointerType(PointerIcon.TYPE_GRABBING);
            InputDevice device = InputDevice.getDevice(mDeviceId);
            if (device != null) {
                device.setPointerType(PointerIcon.TYPE_GRABBING);
            }
        }
    }