Files
OpenCellular/common
Jeffy Chen 0ddaa7d9eb virtual_battery: Avoid unexpected batt_mode_cache refreshing
Currently we are assuming batt_mode would never be zero, but that is not
always true. Some battery do report zero for batt_mode(bob for example).

So everytime the batt_mode_cache been set to zero, the virtual_battery
would consider it uninited, and tries to refresh the next time.

Use -1 as uninited batt_mode_cache to avoid that.

BUG=b:66555246
BRANCH=gru
TEST=Check on bob, the battery level is correct.

Change-Id: Ieb7ec9403f69a6b5bca93c6682ec6117fe95fe1e
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/678135
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Philip Chen <philipchen@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
2017-09-25 21:06:52 -07:00
..
2017-09-22 10:18:50 -07:00
2017-09-13 17:13:54 -07:00
2015-05-19 02:46:27 +00:00
2016-11-15 17:41:53 -08:00
2017-08-12 22:58:43 -07:00
2017-09-11 11:14:24 -07:00
2016-03-02 13:39:47 -08:00
2017-09-11 11:14:24 -07:00
2017-06-02 10:38:57 -07:00
2014-05-17 20:14:17 +00:00
2016-03-21 16:35:33 -07:00
2017-05-09 23:20:07 -07:00
2017-08-10 22:47:24 -07:00
2017-08-23 12:19:07 -07:00
2017-09-22 10:18:50 -07:00