diff --git a/services/jni/com_android_server_BatteryService.cpp b/services/jni/com_android_server_BatteryService.cpp index d3f35915d7c00..485c289e68dda 100644 --- a/services/jni/com_android_server_BatteryService.cpp +++ b/services/jni/com_android_server_BatteryService.cpp @@ -215,7 +215,8 @@ static PowerSupplyType readPowerSupplyType(const String8& path) { buf[length - 1] = 0; if (strcmp(buf, "Battery") == 0) return ANDROID_POWER_SUPPLY_TYPE_BATTERY; - else if (strcmp(buf, "Mains") == 0) + else if (strcmp(buf, "Mains") == 0 || strcmp(buf, "USB_DCP") == 0 || + strcmp(buf, "USB_CDP") == 0 || strcmp(buf, "USB_ACA") == 0) return ANDROID_POWER_SUPPLY_TYPE_AC; else if (strcmp(buf, "USB") == 0) return ANDROID_POWER_SUPPLY_TYPE_USB;