Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 484d03d5 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Sudheer Shanka
Browse files

BroadcastQueue: blocked registered receivers.

In most situations, it's reasonable to shortcut and "assumeDelivered"
for registered receivers as a fire-and-forget operation, since if
that app is wedged it'll only impact delivery of future broadcasts
to that app.

However, for ordered and resultTo broadcasts, there are
often other apps that need to be "blocked" until the receiver actually
finishes.  If we "assumeDelivered" in those cases, we'd be subjecting
those other apps to race conditions.

To resolve this, we tighten "assumeDelivered" for these situations,
which also ensure we detect ANRs that would block delivery for other
apps, and add tests to verify.

Bug: 257972988
Test: atest FrameworksMockingServicesTests:BroadcastRecordTest
Test: atest FrameworksMockingServicesTests:BroadcastQueueTest
Test: atest FrameworksMockingServicesTests:BroadcastQueueModernImplTest
Change-Id: I492aa9ff6f7797e64245c2073db8e2ecddfd8544
parent 326f9b5c
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