diff options
| author | 2023-04-05 16:40:41 -0600 | |
|---|---|---|
| committer | 2023-04-10 14:00:36 -0600 | |
| commit | d5b0d8c5246d75703a76001e64e5ec181ec6aaf2 (patch) | |
| tree | f2a896467c0bf291bcfd5ff6e88de4088a21e68b /libs/androidfw/FileStream.cpp | |
| parent | 1be684590b24d84222a2674c167ce1147d7ac68e (diff) | |
Fix bug around deferred prioritized broadcasts.
When deciding if a particular "tranche" of prioritized broadcasts has
been finished, we should consider both the terminal and deferred
states of members of that tranche. Previous attempts to do this used
a pure counting-based mechanism, which can risk opening up future
tranches too early when many receivers have been deferred.
This fix pivots to a new "beyond" concept that tracks the highest
receiver that a broadcast has "moved beyond". This can be either a
terminal state, or deferred states within the currently active
tranche. Once we've moved "beyond" particular receiver, we treat
it as a high-water mark, even when previously deferred broadcasts
that we've moved beyond pivot back to a pending state.
Bug: 272147987
Test: atest FrameworksMockingServicesTests:BroadcastQueueTest
Test: atest FrameworksMockingServicesTests:BroadcastQueueModernImplTest
Test: atest FrameworksMockingServicesTests:BroadcastRecordTest
Change-Id: Iac4c5c7e92a7e009acbe1c248f6f56106152f032
Diffstat (limited to 'libs/androidfw/FileStream.cpp')
0 files changed, 0 insertions, 0 deletions