BatteryMonitor: support battery health NOT_AVAILABLE from health status
Battery health is supported but there is not enough information to determine an accurate value This is a temporary state. Bug: 276400004 Test: m Change-Id: I0d422db20c51ef7e9dc4fa904729beda625c9fea Signed-off-by: Jack Wu <wjack@google.com>
This commit is contained in:
parent
cf1ca03836
commit
cf996f3d8d
|
@ -242,6 +242,8 @@ BatteryHealth getBatteryHealthStatus(int status) {
|
|||
value = BatteryHealth::DEAD;
|
||||
else if (status == BatteryMonitor::BH_FAILED)
|
||||
value = BatteryHealth::UNSPECIFIED_FAILURE;
|
||||
else if (status == BatteryMonitor::BH_NOT_AVAILABLE)
|
||||
value = BatteryHealth::NOT_AVAILABLE;
|
||||
else
|
||||
value = BatteryHealth::UNKNOWN;
|
||||
|
||||
|
|
|
@ -62,6 +62,7 @@ class BatteryMonitor {
|
|||
BH_MARGINAL,
|
||||
BH_NEEDS_REPLACEMENT,
|
||||
BH_FAILED,
|
||||
BH_NOT_AVAILABLE,
|
||||
};
|
||||
|
||||
BatteryMonitor();
|
||||
|
|
Loading…
Reference in New Issue