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

Skip to content
Commit 4b238fb0 authored by Dmitri Plotnikov's avatar Dmitri Plotnikov
Browse files

Reset time-since-update if the tracked value is nonmonotonic

The absence of this reset led to timeInStateSinceUpdate exceeding
total timeSinceUpdate.  This resulted in inflated counts,
which are smeared using the `delta * timeInState / timeSinceUpdate` formula.
So, instead of assigning a portion of the time to a specific state
it would assign a multiple of the time to it.

Bug: 204087731
Test: atest libbattery_test

Change-Id: I7805d5c6aa314f4030c8a1ac9541f2d439a471cb
parent 7804d910
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment