healthd: read individual battery property value on demand
Adding support for batteryChargeCounter and batteryCurrentNow as parameters
likely to be useful for power consumption analysis.
Change-Id: Ib23b05d3c31c22ece0d21e55cc481c1b5dabe59e
diff --git a/healthd/BatteryPropertiesRegistrar.cpp b/healthd/BatteryPropertiesRegistrar.cpp
index 6a33ad8..3e06866 100644
--- a/healthd/BatteryPropertiesRegistrar.cpp
+++ b/healthd/BatteryPropertiesRegistrar.cpp
@@ -67,6 +67,10 @@
}
}
+status_t BatteryPropertiesRegistrar::getProperty(int id, struct BatteryProperty *val) {
+ return mBatteryMonitor->getProperty(id, val);
+}
+
void BatteryPropertiesRegistrar::binderDied(const wp<IBinder>& who) {
Mutex::Autolock _l(mRegistrationLock);