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

Commit 519c42ee authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Allowing sticky broadcasts for null receivers to be received/registered...

Merge "Allowing sticky broadcasts for null receivers to be received/registered for without requiring a RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED flag."
parents e6c1511d 68ea4721
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -12578,8 +12578,11 @@ public class ActivityManagerService extends IActivityManager.Stub
            }
            // If the change is enabled, but neither exported or not exported is set, we need to log
            // an error so the consumer can know to explicitly set the value for their flag
            if (!onlyProtectedBroadcasts && (Compatibility.isChangeEnabled(
            // an error so the consumer can know to explicitly set the value for their flag.
            // If the caller is registering for a sticky broadcast with a null receiver, we won't
            // require a flag
            if (!onlyProtectedBroadcasts && receiver != null && (
                    Compatibility.isChangeEnabled(
                            DYNAMIC_RECEIVER_EXPLICIT_EXPORT_REQUIRED)
                            && (flags & (Context.RECEIVER_EXPORTED | Context.RECEIVER_NOT_EXPORTED))
                            == 0)) {