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

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

BroadcastQueue: remove matching broadcasts.

There are common broadcasts that should remove any still-pending
broadcasts of a particular flavor.  For example, sending SCREEN_ON
should remove any still-pending SCREEN_OFF broadcasts.

This change adds a BroadcastOption to support this use-case, along
with tests to validate, and starts wiring up the option to a handful
of straightforward broadcasts.

For this to work effectively, we need to actually remove skipped
events from our per-process queues, which means we need a more
robust way of finishing ordered broadcasts.  This change factors
out the "finishing" of each broadcast to a local setDeliveryState()
method which can then be invoked when a broadcast is removed.

Bug: 245771249
Test: atest FrameworksMockingServicesTests:BroadcastQueueTest
Change-Id: I8c81893841026074ef78d88f9ecc82518164e50e
parent 125e3687
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