Remove the one receiver limit for a broadcast to be considered "urgent".

The goal of this "urgent" concept is to make sure certain broadcasts
such as those sent with FLAG_RECEIVER_FOREGROUND are not blocked behind
normal broadcasts and the current API contract for FLAG_RECEIVER_FOREGROUND
doesn't specify any limit on no. of receivers.

Bug: 263803618
Test: atest services/tests/mockingservicestests/src/com/android/server/am/BroadcastQueueTest.java
Test: atest services/tests/mockingservicestests/src/com/android/server/am/BroadcastQueueModernImplTest.java
Change-Id: I5b6b851aa5b735f0290b8fc4870468c8627b3aba
This commit is contained in:
Sudheer Shanka
2022-12-27 04:08:46 +00:00
parent 786251a6a3
commit a5e953ee90

View File

@@ -655,8 +655,7 @@ final class BroadcastRecord extends Binder {
// TODO: migrate alarm-prioritization flag to BroadcastConstants
return (isForeground()
|| interactive
|| alarm)
&& receivers.size() == 1;
|| alarm);
}
@NonNull String getHostingRecordTriggerType() {