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

Commit 72476a70 authored by Presubmit Automerger Backend's avatar Presubmit Automerger Backend
Browse files

[automerge] Null check on BroadcastRecord's receivers list. 2p: fc32f968

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17590974

Bug: 227729678
Change-Id: I8ccb09aefbf9ccdf0da6f6b679b2568909f08dba
parents b74f621d fc32f968
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -580,6 +580,11 @@ public class BroadcastDispatcher {
    // ----------------------------------
    // BroadcastQueue operation support
    void enqueueOrderedBroadcastLocked(BroadcastRecord r) {
        if (r.receivers == null || r.receivers.isEmpty()) {
            mOrderedBroadcasts.add(r);
            return;
        }

        if (Intent.ACTION_LOCKED_BOOT_COMPLETED.equals(r.intent.getAction())) {
            // Create one BroadcastRecord for each UID that can be deferred.
            final SparseArray<BroadcastRecord> deferred =
+4 −0
Original line number Diff line number Diff line
@@ -414,6 +414,10 @@ final class BroadcastRecord extends Binder {
            return ret;
        }

        if (receivers == null) {
            return ret;
        }

        final String action = intent.getAction();
        if (!Intent.ACTION_LOCKED_BOOT_COMPLETED.equals(action)
                && !Intent.ACTION_BOOT_COMPLETED.equals(action)) {