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

Commit 8b670a3b authored by Yifei Zhang's avatar Yifei Zhang
Browse files

dpc: call updatePowerState instead of post to handler

- When overriding doze screen state, we are already on the same thread.
- Running synchronous here makes it more predictable so that the caller
  can hold and release wake locks.

Test: manual
Bug: 336599466
Change-Id: I20cf9fb08422e32de318c441df3947f613885b0f
parent c286eecc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -798,7 +798,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
                return;
            }
            mDisplayStateController.overrideDozeScreenState(displayState, reason);
            sendUpdatePowerState();
            updatePowerState();
        }, mClock.uptimeMillis());
    }