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

Commit 100bd9c2 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Abort PRE_BOOT dispatch when user is stopped.

If a user was started and then stopped in quick succession, we need
to stop dispatching PRE_BOOT broadcasts for that user.

Bug: 28032940
Change-Id: Ie9aedc2cd66a7a2cb2076e5004831cf8fe1afc4a
parent 5cbcb52b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -69,6 +69,12 @@ public abstract class PreBootBroadcaster extends IIntentReceiver.Stub {
            return;
        }

        if (!mService.isUserRunning(mUserId, 0)) {
            Slog.i(TAG, "User " + mUserId + " is no longer running; skipping remaining receivers");
            onFinished();
            return;
        }

        final ResolveInfo ri = mTargets.get(mIndex++);
        final ComponentName componentName = ri.activityInfo.getComponentName();