healthd: Add callback for screen_on to the healthdHAL
Adds a callback to the healthdHAL which can check for device specific
properties to decide if the screen should turn on.
Change-Id: I543e7729ecb291157df4d3be1bd718f8af01ac40
Signed-off-by: Ruchi Kandoi<kandoiruchi@google.com>
diff --git a/healthd/healthd.cpp b/healthd/healthd.cpp
index 30a4b42..f4171bd 100644
--- a/healthd/healthd.cpp
+++ b/healthd/healthd.cpp
@@ -53,6 +53,7 @@
.batteryCurrentAvgPath = String8(String8::kEmptyString),
.batteryChargeCounterPath = String8(String8::kEmptyString),
.energyCounter = NULL,
+ .screen_on = NULL,
};
static int eventct;
@@ -314,8 +315,8 @@
return -1;
}
- healthd_mode_ops->init(&healthd_config);
healthd_board_init(&healthd_config);
+ healthd_mode_ops->init(&healthd_config);
wakealarm_init();
uevent_init();
gBatteryMonitor = new BatteryMonitor();