BroadcastQueue: pre-calculate blocked counts.
In an upcoming change we're going to try relaxing setDeliveryState() to only invalidateRunnableAt() for processes that have just been unblocked by the operation that just finished. To enable that shift, we'll need blockedUntilTerminalCount access at the BroadcastRecord level, so this change shifts to calculating it when we create the BroadcastRecord; this also saves an extra traversal of the receivers list to derive the "prioritized" boolean. Bug: 253906105 Test: atest FrameworksMockingServicesTests:BroadcastRecordTest Test: atest FrameworksMockingServicesTests:BroadcastQueueTest Test: atest FrameworksMockingServicesTests:BroadcastQueueModernImplTest Change-Id: Ie689360d4f2c7af7d936259d9dfa05f663f450a8
Loading
Please register or sign in to comment