BroadcastQueue: add support for REPLACE_PENDING.
The "default" stack has support for FLAG_RECEIVER_REPLACE_PENDING, which swaps any pending broadcasts with a new replacement. If there are no pending matches, then the broadcast is sent as normal. This change implements this flag feature for the "modern" stack, which is a bit more tricky due to the per-process queues. We first mark any per-process receivers as being "skipped", and then do any replacement when enqueueing it later. This is because the updated broadcast may have dropped a previous receiver target, which we still need to mark as "skipped" to avoid accidental delivery to that now-stale target. Update "default" stack to support postSyncBarrier(); the handler used there isn't hosting UI, so it has no other sync barriers. Bug: 245771249 Test: atest FrameworksMockingServicesTests:BroadcastQueueTest Test: atest FrameworksMockingServicesTests:BroadcastQueueModernImplTest Change-Id: I1c40fc62cabd7388519627d29802c3f710235009
Loading
Please register or sign in to comment