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

Skip to content
Commit f4fa114c authored by Philip Junker's avatar Philip Junker
Browse files

Move logic from dreamDisplayGroupNoUpdateLocked into PowerGroup.

Add onWakefulnessChangedCallback which is called whenever the wakefulness of a PowerGroup changes.
Set the wakefulness for a new PowerGroup to WAKEFULNESS_AWAKE instead of the current global wakefulness. This way the newly added PowerGroup will not directly go to sleep if the device happens to be asleep.
Introduce per power group lastWakeTime and lastSleepTime.
Rename setGlobalWakefulnessLocked() to
updateGlobalWakefulnessLocked(), getGlobalWakefulnessLocked() to recalculateGlobalWakefulnessLocked() and getWakefulnessLocked() to getGlobalWakefulnessLocked().
Rename dreamDisplayGroupNoUpdateLocked() to dreamPowerGroupLocked().
Rename sleepDisplayGroupNoUpdateLocked() to dozePowerGroupLocked().
Rename reallySleepDisplayGroupNoUpdateLocked() to sleepPowerGroupLocked().
Rename wakeDisplayGroupNoUpdateLocked() to wakePowerGroupLocked().

Test: atest FrameworksServicesTests:PowerManagerServiceTest
Bug: 200653844
Change-Id: Ic90f3b0c116e8e9db7df730f1500c0e8b99fe677
parent 7ade3e1c
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