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

Skip to content
Commit a7724753 authored by Mike Ma's avatar Mike Ma
Browse files

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
parent 056dd6aa
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