healthd: break link between BatteryMonitor and BatteryPropertiesRegistrar
Make it easier to later separate out binder-related code.
Add helper functions healthd_battery_update(), healthd_get_property() to
allow these operations without needing references to the BatteryMonitor
object.
Change-Id: Ie584bf53e5178ce0a098d0d940d6c311fdff62d4
diff --git a/healthd/healthd.h b/healthd/healthd.h
index 5a1ad18..dc3f67e 100644
--- a/healthd/healthd.h
+++ b/healthd/healthd.h
@@ -18,6 +18,7 @@
#define _HEALTHD_H_
#include <batteryservice/BatteryService.h>
+#include <utils/Errors.h>
#include <utils/String8.h>
// periodic_chores_interval_fast, periodic_chores_interval_slow: intervals at
@@ -65,6 +66,12 @@
android::String8 batteryChargeCounterPath;
};
+// Global helper functions
+
+void healthd_battery_update();
+android::status_t healthd_get_property(int id,
+ struct android::BatteryProperty *val);
+
// The following are implemented in libhealthd_board to handle board-specific
// behavior.
//