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

Commit a8a8256f authored by Dave Mankoff's avatar Dave Mankoff
Browse files

Fix NPE in DozeSensors.

Bug: 141318652
Test: atest SystemUITests
Change-Id: I8351d7019f7023efc4265cf926a7c86badf05b5a
parent c022a8d1
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -148,7 +148,11 @@ public class DozeSensors {
        mProximitySensor = new ProximitySensor(context, sensorManager);

        mProximitySensor.register(
                proximityEvent -> mProxCallback.accept(!proximityEvent.getNear()));
                proximityEvent -> {
                    if (proximityEvent != null) {
                        mProxCallback.accept(!proximityEvent.getNear());
                    }
                });
    }

    /**