summaryrefslogtreecommitdiffstats
path: root/healthd
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2016-02-04 02:35:19 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-02-04 02:35:19 +0000
commit96e3d1b5c1033548440a49a2c53f5353ca94630a (patch)
tree796a914d3c360e92ff51e2eca927740570c3f40e /healthd
parentd8e0108418a777edcb9e1c3452866db62e1ba5ab (diff)
parenta9028879707d58f286014c4a6a9c6b53f61c2806 (diff)
downloadsystem_core-96e3d1b5c1033548440a49a2c53f5353ca94630a.tar.gz
system_core-96e3d1b5c1033548440a49a2c53f5353ca94630a.tar.bz2
system_core-96e3d1b5c1033548440a49a2c53f5353ca94630a.zip
Merge "Add support for USB_HVDCP chargers" am: ba3014c914
am: a902887970 * commit 'a9028879707d58f286014c4a6a9c6b53f61c2806': Add support for USB_HVDCP chargers
Diffstat (limited to 'healthd')
-rw-r--r--healthd/BatteryMonitor.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/healthd/BatteryMonitor.cpp b/healthd/BatteryMonitor.cpp
index 3b5ff35b3..6aa360bdb 100644
--- a/healthd/BatteryMonitor.cpp
+++ b/healthd/BatteryMonitor.cpp
@@ -134,6 +134,7 @@ BatteryMonitor::PowerSupplyType BatteryMonitor::readPowerSupplyType(const String
{ "Mains", ANDROID_POWER_SUPPLY_TYPE_AC },
{ "USB", ANDROID_POWER_SUPPLY_TYPE_USB },
{ "USB_DCP", ANDROID_POWER_SUPPLY_TYPE_AC },
+ { "USB_HVDCP", ANDROID_POWER_SUPPLY_TYPE_AC },
{ "USB_CDP", ANDROID_POWER_SUPPLY_TYPE_AC },
{ "USB_ACA", ANDROID_POWER_SUPPLY_TYPE_AC },
{ "USB_C", ANDROID_POWER_SUPPLY_TYPE_AC },
@@ -147,8 +148,10 @@ BatteryMonitor::PowerSupplyType BatteryMonitor::readPowerSupplyType(const String
return ANDROID_POWER_SUPPLY_TYPE_UNKNOWN;
ret = (BatteryMonitor::PowerSupplyType)mapSysfsString(buf, supplyTypeMap);
- if (ret < 0)
+ if (ret < 0) {
+ KLOG_WARNING(LOG_TAG, "Unknown power supply type '%s'\n", buf);
ret = ANDROID_POWER_SUPPLY_TYPE_UNKNOWN;
+ }
return ret;
}