AutoOnFeature: Address sleep mode
Posting a delayed message on a handler will be impacted by how many time
the device has been in sleep mode (see os/Handler.java).
To circumvent this issue, we need to use an AlarmManager.
Still the AlarmManager we use will not fire at a precise time since we
do not care of being start at the exact time. This allow to not impact
too much the battery life of the phone (see `set` vs `setExact`)
All remaining behavior are kept the same
Bug: 323060869
Bug: 330735050
Fix: 330735050
Test: Manual | let the phone go into sleep mode, verify that bluetooth
restart when exiting sleep mode
Flag: 323060869
Change-Id: Id8e9221e3af0853583ae059d0ae870859caf4b1c
Loading
Please register or sign in to comment