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>
diff --git a/healthd/BatteryMonitor.cpp b/healthd/BatteryMonitor.cpp
index 66e1e63..f68d65a 100644
--- a/healthd/BatteryMonitor.cpp
+++ b/healthd/BatteryMonitor.cpp
@@ -242,6 +242,8 @@
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;
diff --git a/healthd/include/healthd/BatteryMonitor.h b/healthd/include/healthd/BatteryMonitor.h
index 7b4f46c..a4c013b 100644
--- a/healthd/include/healthd/BatteryMonitor.h
+++ b/healthd/include/healthd/BatteryMonitor.h
@@ -62,6 +62,7 @@
BH_MARGINAL,
BH_NEEDS_REPLACEMENT,
BH_FAILED,
+ BH_NOT_AVAILABLE,
};
BatteryMonitor();