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

Commit 9c6970cf authored by Adrian Roos's avatar Adrian Roos Committed by android-build-merger
Browse files

Merge "AOD: Fix possible NPE in DozeSensors" into oc-dr1-dev am: d7aa26f3

am: bdc9d47c

Change-Id: Ife7e47b06d08967a210ae6db46bbaa015926302e
parents b05305c1 bdc9d47c
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -233,7 +233,9 @@ public class DozeSensors {
            mProxCallback.accept(mCurrentlyFar);

            long now = SystemClock.elapsedRealtime();
            if (!mCurrentlyFar) {
            if (mCurrentlyFar == null) {
                // Sensor has been unregistered by the proxCallback. Do nothing.
            } else if (!mCurrentlyFar) {
                mLastNear = now;
            } else if (mCurrentlyFar && now - mLastNear < COOLDOWN_TRIGGER) {
                // If the last near was very recent, we might be using more power for prox