Actually wait until the display is ready.
When this was rewritten to only wait for display state changes and not
brightness changes, it forgot to take into account whether a change was
already in flight when reporting whether a change was happening. Fix
that so the display appropriately reports when it's ready and when it's
blocked.
Bug: 32559368
Test: Take systrace of device wakeup, see it actually waits until the
display is actually ready
Change-Id: Ie3bd5c48d109a0fb2628ccc8f67bb52be51fad5c
This commit is contained in:
@@ -369,8 +369,8 @@ final class DisplayPowerState {
|
||||
mPendingBacklight = backlight;
|
||||
|
||||
boolean changeInProgress = mStateChangeInProgress || mBacklightChangeInProgress;
|
||||
mStateChangeInProgress = stateChanged;
|
||||
mBacklightChangeInProgress = backlightChanged;
|
||||
mStateChangeInProgress = stateChanged || mStateChangeInProgress;
|
||||
mBacklightChangeInProgress = backlightChanged || mBacklightChangeInProgress;
|
||||
|
||||
if (!changeInProgress) {
|
||||
mLock.notifyAll();
|
||||
|
||||
Reference in New Issue
Block a user