Go to sleep on boot when booting in quiescent mode
In quiescent mode, the display is forced to be off.
But the device was still in an awake state, even though the display was
off, leading to some unexpected behaviours.
For example, the device considers itself interactive, which it normally
doesn't when the display is off. Due to that, a power button press would
put the device to sleep, instead of coming out of quiescent mode and
turning the display on.
With this change, the device goes to sleep after boot is completed
if quiescent mode is set, and the quiescent flag is cleared when waking up.
On a wakeup the display will turn on as expected.
Bug: 145265927
Test: Reboot in quiescent mode (`adb reboot quiescent`),
connect remote, press power button.
Expected result: device wakes up, display turns on
Test: atest PowerManagerServiceTest
Change-Id: Id3fca6fa9fcf77da989ecb764e1380e21be0e041
4 files changed