Attribute UNKNOWN display state to OFF
When device restarts, screen state is set to unknown, all timebases stop. Then if setBatteryStateLocked() is called with unplugged state, onBatteryTimeBase starts, but onBatteryScreenOffTimeBase does not, so does ScreenOnTimer, since screen state == unknown. So this duration is lost. This fix attributes unknown state to ScreenOff. Fixes: 67608353 Test: added a unit test in BatteryStatsNoteTest Change-Id: Iee68898522564963e7d0b0110f1aee9248aacfe8
Loading
Please register or sign in to comment