healthd: move Android communication code to separate source
* add ops for different "modes" of healthd operation: android vs. recovery
* recovery mode selected by runstring options -r
* binder/Android communication moved to android mode
* recovery mode ops avoiding binder service registration
* "no service manager" flag removed; now handled by android vs. other modes
Change-Id: I3d8c89bf96a18a6a00cc85306f9a07d3f408f2a0
diff --git a/healthd/healthd.h b/healthd/healthd.h
index 41dde13..6e5f5a7 100644
--- a/healthd/healthd.h
+++ b/healthd/healthd.h
@@ -73,6 +73,15 @@
android::status_t healthd_get_property(int id,
struct android::BatteryProperty *val);
+struct healthd_mode_ops {
+ void (*init)(struct healthd_config *config);
+ int (*preparetowait)(void);
+ void (*heartbeat)(void);
+ void (*battery_update)(struct android::BatteryProperties *props);
+};
+
+extern struct healthd_mode_ops *healthd_mode_ops;
+
// The following are implemented in libhealthd_board to handle board-specific
// behavior.
//