summaryrefslogtreecommitdiffstats
path: root/healthd
diff options
context:
space:
mode:
authorYueyao Zhu <yueyao@google.com>2017-06-12 16:55:38 -0700
committerYueyao Zhu <yueyao@google.com>2017-06-20 18:08:51 -0700
commit9bbfbf7ffe2df9e04b9c85f1419e658010932ec4 (patch)
tree92213ebb05943f52d06e8603f409e6b90a8a3bae /healthd
parent66e1a1e3e291d6eb0ec2e9a996c674907b012398 (diff)
downloadcore-9bbfbf7ffe2df9e04b9c85f1419e658010932ec4.tar.gz
core-9bbfbf7ffe2df9e04b9c85f1419e658010932ec4.tar.bz2
core-9bbfbf7ffe2df9e04b9c85f1419e658010932ec4.zip
healthd: add battery health status values from JEITA spec
Some vendors implement JEITA battery health spec. Bug: 35780570 Test: build and boot Change-Id: I532cd0fbdbcae0a32879de7d7930f3ccb8605ffd
Diffstat (limited to 'healthd')
-rw-r--r--healthd/BatteryMonitor.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/healthd/BatteryMonitor.cpp b/healthd/BatteryMonitor.cpp
index 45b6edaf2..4e3b885ce 100644
--- a/healthd/BatteryMonitor.cpp
+++ b/healthd/BatteryMonitor.cpp
@@ -116,6 +116,10 @@ int BatteryMonitor::getBatteryHealth(const char* status) {
{ "Over voltage", BATTERY_HEALTH_OVER_VOLTAGE },
{ "Unspecified failure", BATTERY_HEALTH_UNSPECIFIED_FAILURE },
{ "Cold", BATTERY_HEALTH_COLD },
+ // battery health values from JEITA spec
+ { "Warm", BATTERY_HEALTH_GOOD },
+ { "Cool", BATTERY_HEALTH_GOOD },
+ { "Hot", BATTERY_HEALTH_OVERHEAT },
{ NULL, 0 },
};