diff options
author | Elliott Hughes <enh@google.com> | 2016-02-04 00:12:06 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-02-04 00:12:06 +0000 |
commit | a9028879707d58f286014c4a6a9c6b53f61c2806 (patch) | |
tree | d8191da65cb938a49d4c0fc5d71dc98b8e2726f4 /healthd | |
parent | 046bf3b212e9a01c3f2671c208ae3bfc8fdcd62b (diff) | |
parent | ba3014c914eb65911b3bb367a1b8e02705ecf398 (diff) | |
download | system_core-a9028879707d58f286014c4a6a9c6b53f61c2806.tar.gz system_core-a9028879707d58f286014c4a6a9c6b53f61c2806.tar.bz2 system_core-a9028879707d58f286014c4a6a9c6b53f61c2806.zip |
Merge "Add support for USB_HVDCP chargers"
am: ba3014c914
* commit 'ba3014c914eb65911b3bb367a1b8e02705ecf398':
Add support for USB_HVDCP chargers
Diffstat (limited to 'healthd')
-rw-r--r-- | healthd/BatteryMonitor.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/healthd/BatteryMonitor.cpp b/healthd/BatteryMonitor.cpp index cdfe9c573..8f98f1734 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; } |