Make Light Doze timings deterministic.
Switch the light idle timing mechanism to ensure the system always exits
light idle at consistent times after screen off. With this change, we
don't need to formally enter light idle to get into the maintenance
window at the correct time, so we change that alarm to a non-wakeup
alarm. The alarm will fire when the CPU is awake. If the CPU isn't
awake, then waking up the CPU just to say we're going to light idle
doesn't provide much benefit. We keep a wakeup alarm only for coming out
of light idle to enter the maintenance window.
Also, removing the PRE_IDLE state and combining the duration with the
INACTIVE->IDLE time.
Bug: 208820086
Test: atest DeviceIdleTest
Test: atest FrameworksMockingServicesTests:DeviceIdleControllerTest
Change-Id: Icccf78850039c51ac67abc5fa126c6a33f51dfba
2 files changed