mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-09 09:01:35 +00:00
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>
7.5 KiB
7.5 KiB