Skip to content
Commit 8b5c186d authored by Robert Horvath's avatar Robert Horvath
Browse files

When asleep, dismiss inattentive sleep warning, don't reschedule

In the PowerManagerService power state update method the inattentive
sleep warning was dismissed when the device wasn't awake.
This incorrectly also happened when the device was dreaming, dismissing
the warning only to show it immediately again, causing some flicker.
Also, the message triggering the warning to be shown and the device to
go to sleep was still rescheduled when the device was already asleep,
which is unnecessary.

Bug: 243491344
Test: atest PowerManagerServiceTest#testInattentiveSleep_warningStaysWhenDreaming
Test: atest PowerManagerServiceTest#testInattentiveSleep_warningNotShownWhenSleeping
Change-Id: Iaddf84b107a231467653dd98b46839579444a56a
parent 0c867c02
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment