diff --git a/healthd/BatteryPropertiesRegistrar.cpp b/healthd/BatteryPropertiesRegistrar.cpp index d28ba41ff..523e1f136 100644 --- a/healthd/BatteryPropertiesRegistrar.cpp +++ b/healthd/BatteryPropertiesRegistrar.cpp @@ -77,6 +77,10 @@ status_t BatteryPropertiesRegistrar::getProperty(int id, struct BatteryProperty return healthd_get_property(id, val); } +void BatteryPropertiesRegistrar::scheduleUpdate() { + healthd_battery_update(); +} + status_t BatteryPropertiesRegistrar::dump(int fd, const Vector& /*args*/) { IPCThreadState* self = IPCThreadState::self(); const int pid = self->getCallingPid(); diff --git a/healthd/BatteryPropertiesRegistrar.h b/healthd/BatteryPropertiesRegistrar.h index 095f3d37c..14e914514 100644 --- a/healthd/BatteryPropertiesRegistrar.h +++ b/healthd/BatteryPropertiesRegistrar.h @@ -32,6 +32,7 @@ class BatteryPropertiesRegistrar : public BnBatteryPropertiesRegistrar, public: void publish(const sp& service); void notifyListeners(const struct BatteryProperties& props); + void scheduleUpdate(); private: Mutex mRegistrationLock;