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

Commit 347c8de2 authored by Paul Lawrence's avatar Paul Lawrence Committed by Todd Poynor
Browse files

healthd: Add battery capacity to getProperty

Add support for BATTERY_PROP_CAPACITY property in getProperty

Bug: 11985952
Change-Id: I905cda68f990fa96138a16a11c55f2d902d0bbc1
parent 2eb5d85b
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -302,6 +302,16 @@ status_t BatteryMonitor::getProperty(int id, struct BatteryProperty *val) {
        }
        break;

    case BATTERY_PROP_CAPACITY:
        if (!mHealthdConfig->batteryCapacityPath.isEmpty()) {
            val->valueInt =
                getIntField(mHealthdConfig->batteryCapacityPath);
            ret = NO_ERROR;
        } else {
            ret = NAME_NOT_FOUND;
        }
        break;

    default:
        break;
    }