diff options
-rw-r--r-- | healthd/BatteryMonitor.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/healthd/BatteryMonitor.cpp b/healthd/BatteryMonitor.cpp index 3e6a4b181..9368225bf 100644 --- a/healthd/BatteryMonitor.cpp +++ b/healthd/BatteryMonitor.cpp @@ -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; } |