Merge "healthd: Fix incorrect return check"
This commit is contained in:
commit
ec56c59dbb
|
@ -181,7 +181,7 @@ BatteryMonitor::PowerSupplyType BatteryMonitor::readPowerSupplyType(const String
|
|||
return ANDROID_POWER_SUPPLY_TYPE_UNKNOWN;
|
||||
|
||||
auto ret = mapSysfsString(buf.c_str(), supplyTypeMap);
|
||||
if (ret < 0) {
|
||||
if (!ret) {
|
||||
KLOG_WARNING(LOG_TAG, "Unknown power supply type '%s'\n", buf.c_str());
|
||||
*ret = ANDROID_POWER_SUPPLY_TYPE_UNKNOWN;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue