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

Commit 16b26358 authored by Tim Murray's avatar Tim Murray Committed by Android (Google) Code Review
Browse files

Merge "BroadcastProcessQueue: fix wait-for-broadcast-barrier/idle"

parents 9106ef94 90bb5e56
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -747,7 +747,7 @@ class BroadcastProcessQueue {
     * be delivered at some point in the future.
     */
    public boolean isIdle() {
        return !isActive() && isEmpty();
        return (!isActive() && isEmpty()) || isDeferredUntilActive();
    }

    /**
@@ -769,7 +769,8 @@ class BroadcastProcessQueue {
        final boolean nextOffloadBeyond = (nextOffload == null)
                || ((BroadcastRecord) nextOffload.arg1).enqueueTime > barrierTime;

        return activeBeyond && nextBeyond && nextUrgentBeyond && nextOffloadBeyond;
        return (activeBeyond && nextBeyond && nextUrgentBeyond && nextOffloadBeyond)
                || isDeferredUntilActive();
    }

    public boolean isRunnable() {