Relax delivery group policy constraints for resultTo bcasts.

For resultTo broadcasts, we can always skip and remove the old
broadcast for a deferred receiver as long as it is one of the
intended receiver for the new broadcast.

Also, limit the application of "merged" delivery group policy
to only broadcasts with one receiver for now as it is not
trivial to support broadcasts with multiple receivers.

Bug: 279696145
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: Iaf30a8f6d7d3bb0c77727ea621b22c190ec86f1e
2 files changed