Skip beyond receivers in a process once it's cached.

When a process is cached, broadcasts to the process could be
delayed but we do not want to block delivery to other receivers
that are in a lower priority tranche than the deferred receivers.
We already take care of this, but only if all receivers in a
process are deferred until active. Since it's possible we defer
delivery by a few minutes (not defer until active) to cached
processes, we should skip beyond receivers in the cached process.

Bug: 298300047
Bug: 305877431
Test: atest services/tests/mockingservicestests/src/com/android/server/am/BroadcastQueueTest.java
Test: atest services/tests/mockingservicestests/src/com/android/server/am/BroadcastQueueModernImplTest.java
Test: atest CtsBroadcastTestCases
Change-Id: Iaf310716433824d2136b8385f7642ffdd49431eb
Merged-In: Iaf310716433824d2136b8385f7642ffdd49431eb
5 files changed