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

Skip to content
Commit c401df9f authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

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
parent 297621c0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment