batteryservice: add scheduleUpdate binder method
Allows a caller to force an update to occur, instead of waiting
for an event or timer timeout.
Test: None (interface change)
Bug: 32645990
Change-Id: I1c94f1bed34d5f4cfe8e7d50cca4e5391dac2d62
diff --git a/include/batteryservice/IBatteryPropertiesRegistrar.h b/include/batteryservice/IBatteryPropertiesRegistrar.h
index b5c3a4d..a7dbea6 100644
--- a/include/batteryservice/IBatteryPropertiesRegistrar.h
+++ b/include/batteryservice/IBatteryPropertiesRegistrar.h
@@ -27,6 +27,7 @@
REGISTER_LISTENER = IBinder::FIRST_CALL_TRANSACTION,
UNREGISTER_LISTENER,
GET_PROPERTY,
+ SCHEDULE_UPDATE,
};
class IBatteryPropertiesRegistrar : public IInterface {
@@ -36,6 +37,7 @@
virtual void registerListener(const sp<IBatteryPropertiesListener>& listener) = 0;
virtual void unregisterListener(const sp<IBatteryPropertiesListener>& listener) = 0;
virtual status_t getProperty(int id, struct BatteryProperty *val) = 0;
+ virtual void scheduleUpdate() = 0;
};
class BnBatteryPropertiesRegistrar : public BnInterface<IBatteryPropertiesRegistrar> {