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

Commit b42d7926 authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android Git Automerger
Browse files

am d02b248c: am 34dde19f: am f931e3c2: Merge "Always use REGISTERED_ONLY when...

am d02b248c: am 34dde19f: am f931e3c2: Merge "Always use REGISTERED_ONLY when appropriate." into mnc-dev

* commit 'd02b248c':
  Always use REGISTERED_ONLY when appropriate.
parents 7a7439bd d02b248c
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -15994,6 +15994,11 @@ public final class ActivityManagerService extends ActivityManagerNative
        // By default broadcasts do not go to stopped apps.
        intent.addFlags(Intent.FLAG_EXCLUDE_STOPPED_PACKAGES);
        // If we have not finished booting, don't allow this to launch new processes.
        if (!mProcessesReady && (intent.getFlags()&Intent.FLAG_RECEIVER_BOOT_UPGRADE) == 0) {
            intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);
        }
        if (DEBUG_BROADCAST_LIGHT) Slog.v(TAG_BROADCAST,
                (sticky ? "Broadcast sticky: ": "Broadcast: ") + intent
                + " ordered=" + ordered + " userid=" + userId);
@@ -16455,8 +16460,7 @@ public final class ActivityManagerService extends ActivityManagerNative
            // if the caller really truly claims to know what they're doing, go
            // ahead and allow the broadcast without launching any receivers
            if ((flags&Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT) != 0) {
                intent = new Intent(intent);
                intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);
                // This will be turned into a FLAG_RECEIVER_REGISTERED_ONLY later on if needed.
            } else if ((flags&Intent.FLAG_RECEIVER_REGISTERED_ONLY) == 0) {
                Slog.e(TAG, "Attempt to launch receivers of broadcast intent " + intent
                        + " before boot completion");