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

Commit 16e14c03 authored by Danny Baumann's avatar Danny Baumann
Browse files

Fix light filter sometimes being slow when changing light conditions.

If the screen is turned off, the light filter is supposed to be reset
when the screen comes back on. On screen off, the light sensor listener
is unregistered, and the code relies on it not being called anymore.
That assumption doesn't hold true, though (verified by checking logs),
which causes the light filter to be filled while the screen is off.
parent 94cd3e4c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3392,7 +3392,7 @@ class PowerManagerService extends IPowerManager.Stub
            synchronized (mLocks) {
                // ignore light sensor while screen is turning off
                // or when flashlight would affect it
                if (isScreenTurningOffLocked() || mIgnoreLightSensor) {
                if (isScreenTurningOffLocked() || mIgnoreLightSensor || !mLightSensorEnabled) {
                    return;
                }