Merge "healthd: Implement scheduleUpdate" am: 6edabc75ab

am: c0405200b8

Change-Id: I46ebe99dfe4c0188cfae63db845c86efe1ec3bf3
This commit is contained in:
Adam Lesinski 2017-03-23 01:03:16 +00:00 committed by android-build-merger
commit 50094d9865
2 changed files with 5 additions and 0 deletions

View file

@ -77,6 +77,10 @@ status_t BatteryPropertiesRegistrar::getProperty(int id, struct BatteryProperty
return healthd_get_property(id, val); return healthd_get_property(id, val);
} }
void BatteryPropertiesRegistrar::scheduleUpdate() {
healthd_battery_update();
}
status_t BatteryPropertiesRegistrar::dump(int fd, const Vector<String16>& /*args*/) { status_t BatteryPropertiesRegistrar::dump(int fd, const Vector<String16>& /*args*/) {
IPCThreadState* self = IPCThreadState::self(); IPCThreadState* self = IPCThreadState::self();
const int pid = self->getCallingPid(); const int pid = self->getCallingPid();

View file

@ -32,6 +32,7 @@ class BatteryPropertiesRegistrar : public BnBatteryPropertiesRegistrar,
public: public:
void publish(const sp<BatteryPropertiesRegistrar>& service); void publish(const sp<BatteryPropertiesRegistrar>& service);
void notifyListeners(const struct BatteryProperties& props); void notifyListeners(const struct BatteryProperties& props);
void scheduleUpdate();
private: private:
Mutex mRegistrationLock; Mutex mRegistrationLock;