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
Loading
Please register or sign in to comment