healthd: Show animation before waiting on timer am: 6f8314900f

am: 2ed637210e

Change-Id: Ibb768d6760a13a9b25a40fabd0fcf8cb283fdba9
This commit is contained in:
Nick Vaccaro 2016-10-27 04:02:17 +00:00 committed by android-build-merger
commit c3c947a7bc

View file

@ -297,12 +297,18 @@ static void wakealarm_init(void) {
}
static void healthd_mainloop(void) {
int nevents = 0;
while (1) {
struct epoll_event events[eventct];
int nevents;
int timeout = awake_poll_interval;
int mode_timeout;
/* Don't wait for first timer timeout to run periodic chores */
if (!nevents)
periodic_chores();
healthd_mode_ops->heartbeat();
mode_timeout = healthd_mode_ops->preparetowait();
if (timeout < 0 || (mode_timeout > 0 && mode_timeout < timeout))
timeout = mode_timeout;
@ -318,11 +324,6 @@ static void healthd_mainloop(void) {
if (events[n].data.ptr)
(*(void (*)(int))events[n].data.ptr)(events[n].events);
}
if (!nevents)
periodic_chores();
healthd_mode_ops->heartbeat();
}
return;