Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b10c0f97 authored by Todd Poynor's avatar Todd Poynor Committed by Android Git Automerger
Browse files

am afae9d24: Merge "BatteryService: Treat USB charging ports and charging accessories as AC"

# Via Android (Google) Code Review (1) and Todd Poynor (1)
* commit 'afae9d24':
  BatteryService: Treat USB charging ports and charging accessories as AC
parents 79e1df27 afae9d24
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;