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

Skip to content
Commit 8c6f3c50 authored by Bookatz's avatar Bookatz
Browse files

Fix batterystat Counter misreporting when charging

The BatteryStatsImpl.Counter would previously increment the count even
when the timeBase was off. Then, when the timeBase was turned back on,
the count would be decreased back to the correct value. Thus, when the
timeBase was on, the reported count would be correct, but when the
timeBase was off, the reported count would be wrong (too high). Here, we
fix this.
We also make some other minor improvements.

Bug: 36728346
Test: runtest -x frameworks/base/core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java
Change-Id: I2fa566a8a4cad4cdff0e6caef37b1eef36a3f5c4
parent 61e2b158
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