summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--health/ChargerDetect.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/health/ChargerDetect.cpp b/health/ChargerDetect.cpp
index 2ba0d15c..1de7e95c 100644
--- a/health/ChargerDetect.cpp
+++ b/health/ChargerDetect.cpp
@@ -116,7 +116,7 @@ void ChargerDetect::onlineUpdate(struct android::BatteryProperties *props) {
if (tcpmPsyName.empty()) {
populateTcpmPsyName(&tcpmPsyName);
- KLOG_INFO(LOG_TAG, "TcpmPsyName:%s\n", tcpmPsyName.c_str());
+ KLOG_INFO(LOG_TAG, "TcpmPsyName:%s\n", tcpmPsyName.c_str());
}
if (!getIntField(kUsbOnlinePath)) {
@@ -134,6 +134,9 @@ void ChargerDetect::onlineUpdate(struct android::BatteryProperties *props) {
}
}
+ /* Safe to assume AC charger here if BC1.2 non compliant */
+ props->chargerAcOnline = true;
+
if (tcpmPsyName.empty()) {
return;
}
@@ -145,9 +148,6 @@ void ChargerDetect::onlineUpdate(struct android::BatteryProperties *props) {
}
KLOG_INFO(LOG_TAG, "TcpmPsy Usbtype:%s\n", usbPsyType.c_str());
- if (usbPsyType == "PD" || usbPsyType == "PD_PPS") {
- props->chargerAcOnline = true;
- }
return;
}