summaryrefslogtreecommitdiff
path: root/libs/androidfw/ConfigDescription.cpp
diff options
context:
space:
mode:
author Jeff Sharkey <jsharkey@android.com> 2022-10-26 16:34:53 -0600
committer Jeff Sharkey <jsharkey@android.com> 2022-10-27 11:01:05 -0600
commitf08577b99f8ac99004167b588ccf0460945a45d3 (patch)
treef9f7b3f17fe6ac035866acbefc5ce2c0e2c072d7 /libs/androidfw/ConfigDescription.cpp
parent299e0e89326460524538caeb953456420abc47b2 (diff)
BroadcastQueue: wait for Loopers to idle.
Several components within the system send broadcasts by dispatching through an intermediate Handler. This can return quickly to external callers before a broadcast has actually been enqueued, and if they use "wait-for-broadcast-idle" or "wait-for-broadcast-barrier" they can race with the pending Handler message to observe a false-positive idle result, resulting in test flakiness. This change collects all system_server Looper instances which send broadcasts, and ensures that they've drained pending Message events before proceeding with the BroadcastQueue idle checks. Bug: 255761805 Test: atest FrameworksMockingServicesTests:BroadcastRecordTest Test: atest FrameworksMockingServicesTests:BroadcastQueueTest Test: atest FrameworksMockingServicesTests:BroadcastQueueModernImplTest Change-Id: I5c5e27c619338712193a2f094ea540320e872148
Diffstat (limited to 'libs/androidfw/ConfigDescription.cpp')
0 files changed, 0 insertions, 0 deletions