Change device-idle alarm fuzzing
- Removing fuzz in the absence of an alarm clock alarm.
- Adding a minimum duration that the alarm should be fuzzed before an
alarm clock - currently 2 minutes.
- The maximum fuzz is now a linear function of futurity of the alarm
with the maximum capped at 15 minutes.
- If the futurity is less than the minimum fuzz, the alarm goes off
immediately, bringing the device out of idle.
Also, fixing a bug with re-evaluating alarm deliverability in doze and
battery saver.
Test: atest FrameworksMockingServicesTests:com.android.server.alarm
Bug: 170279979
Bug: 166693547
Change-Id: Ia8c656a0336cc0b72f0b3901de96d4aa440186d4
2 files changed