Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9291de89 authored by Nick Vaccaro's avatar Nick Vaccaro Committed by android-build-merger
Browse files

healthd: Show animation before waiting on timer

am: 6f831490

Change-Id: I4fd5665ff1b7ce646aa0b515aeb38152a340d8a1
parents d918b707 6f831490
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -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;