Skip to content
Commit ace585b4 authored by Lee Shombert's avatar Lee Shombert
Browse files

Modern queue: enqueue multiple broadcast receivers

Bug: 253906553

Dispatch multiple broadcast receivers to the same process in a single
binder call.  This change only applies to the modern queue.  The
strategy is to collect a list of receiver instructions in the
ReceiverBatch object, and then process those instructions.

This change never dispatches more than one receiver in a single call,
which means the behavior of the queue has not been changed.  A later
commit will update the maximum number of receivers that can be sent in
a single call.  That change will modify the maximum batch size in
BroadcastConstants.

The two "testDead" tests in the BroadcastQueueTest have been modified
to ensure the first broadcast is processed before the next broadcast
is enqueued.  This avoids the situation in which the modern queue
tries to send a batch of receivers in a single message, failing both
broadcasts in the test method at the same time.

Test: atest
 * FrameworksMockingServicesTests:BroadcastQueueTest

Change-Id: I4f07df2a2edc16a85b9cfb06451429950abdf1fc
parent c7886e98
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