commit | 29ddfe55fbea04685f1a6d6aff0f74269703c775 | [log] [tgz] |
---|---|---|
author | Adam Lesinski <adamlesinski@google.com> | Wed Mar 29 19:29:00 2017 -0700 |
committer | Adam Lesinski <adamlesinski@google.com> | Wed Mar 29 19:34:08 2017 -0700 |
tree | 29be5e70432ad9203e1ff9013d0759cc9cb90a2e | |
parent | 881a623e3522e3e4f0905b606ca5c77cf899b21c [diff] |
BatteryStats: Clamp temperature to 0 Temperature is encoded without the sign-bit, meaning negative temperatures cause an underflow and show up in the history as large values. We do not expect to deal with negative temperatures for debugging/diagnostics so just clamp the temperature to 0. Bug: 33270828 Test: adb shell dumpsys battery set temp -10 && adb shell dumpsys batterystats --history Change-Id: I8a92f770e4a90333eade1bb38f21d2d87bb00430