Merge "BatteryMonitor: support battery health NOT_AVAILABLE from health status"

This commit is contained in:
Treehugger Robot 2023-04-25 03:05:07 +00:00 committed by Gerrit Code Review
commit edb90f203e
2 changed files with 3 additions and 0 deletions

View file

@ -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;

View file

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