summaryrefslogtreecommitdiffstats
path: root/healthd
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2016-12-09 19:23:46 -0800
committerAdam Lesinski <adamlesinski@google.com>2016-12-09 19:23:46 -0800
commitf13c6ff50ad55d1bdfbd065c96a1fc965193c262 (patch)
tree803889abc3753c4c21d87d77f8187ea526c2f6be /healthd
parenta2fc416d6dcb211b787ed0d19126d3c66023e866 (diff)
downloadsystem_core-f13c6ff50ad55d1bdfbd065c96a1fc965193c262.tar.gz
system_core-f13c6ff50ad55d1bdfbd065c96a1fc965193c262.tar.bz2
system_core-f13c6ff50ad55d1bdfbd065c96a1fc965193c262.zip
Add BMS as a Battery type
In order to automatically use the /sys/class/power_supply/bms/charge_full path for reading learned capacity of the battery, the BMS power supply (Battery Management System) needs to be considered a battery. Test: Manual Change-Id: I66e5751547c3dbdc8de0bb3893367cc6f2c9d733
Diffstat (limited to 'healthd')
-rw-r--r--healthd/BatteryMonitor.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/healthd/BatteryMonitor.cpp b/healthd/BatteryMonitor.cpp
index 0c90a5456..369a022c9 100644
--- a/healthd/BatteryMonitor.cpp
+++ b/healthd/BatteryMonitor.cpp
@@ -141,6 +141,7 @@ BatteryMonitor::PowerSupplyType BatteryMonitor::readPowerSupplyType(const String
struct sysfsStringEnumMap supplyTypeMap[] = {
{ "Unknown", ANDROID_POWER_SUPPLY_TYPE_UNKNOWN },
{ "Battery", ANDROID_POWER_SUPPLY_TYPE_BATTERY },
+ { "BMS", ANDROID_POWER_SUPPLY_TYPE_BATTERY },
{ "UPS", ANDROID_POWER_SUPPLY_TYPE_AC },
{ "Mains", ANDROID_POWER_SUPPLY_TYPE_AC },
{ "USB", ANDROID_POWER_SUPPLY_TYPE_USB },