BatteryMonitor: support battery health INCONSISTENT from health status

Report Battery health INCONSISTENT when there is a battery recalibration
pending.

Bug: 283182048
Test: m
Change-Id: I8b944ddac7cc919fc95b1b71b015101642a62f96
Signed-off-by: Jack Wu <wjack@google.com>
This commit is contained in:
Jack Wu 2023-05-19 14:31:53 +08:00
parent 5efd90644b
commit 8231c3fe2d
2 changed files with 3 additions and 0 deletions

View file

@ -244,6 +244,8 @@ BatteryHealth getBatteryHealthStatus(int status) {
value = BatteryHealth::UNSPECIFIED_FAILURE;
else if (status == BatteryMonitor::BH_NOT_AVAILABLE)
value = BatteryHealth::NOT_AVAILABLE;
else if (status == BatteryMonitor::BH_INCONSISTENT)
value = BatteryHealth::INCONSISTENT;
else
value = BatteryHealth::UNKNOWN;

View file

@ -63,6 +63,7 @@ class BatteryMonitor {
BH_NEEDS_REPLACEMENT,
BH_FAILED,
BH_NOT_AVAILABLE,
BH_INCONSISTENT,
};
BatteryMonitor();