commit | 4b238fb0a9bd5533651030faf22391675fc88024 | [log] [tgz] |
---|---|---|
author | Dmitri Plotnikov <dplotnikov@google.com> | Tue Nov 09 11:52:08 2021 -0800 |
committer | Dmitri Plotnikov <dplotnikov@google.com> | Thu Nov 11 10:07:58 2021 -0800 |
tree | eb703c24618acfe00a8039ccde3ad7638985ef59 | |
parent | 7804d910bf010c06e5d38bca68230defae06bc07 [diff] |
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