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

Skip to content
Commit 60df0ce7 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

[6/?] Reduce BroadcastQueue interface complexity.

Hide getMatchingOrderedReceiver() as an implementation detail inside
the broadcast stack.

Also fix obscure unregisterReceiver() bug.  The currently active
receiver is being set like this:

    void deliverToRegisteredReceiverLocked() {
        ...
        r.receiver = filter.receiverList.receiver.asBinder();

Which means that unregisterReceiver() should be using
IIntentReceiver.asBinder() to accurately match any active broadcasts
during unregistration.  (The code before this change passed a
BroadcastRecord instance, which would never match.)

Bug: 243656033
Test: atest CtsContentTestCases:BroadcastReceiverTest
Change-Id: I8594e5060eed5f4dc0d58a29f42cf422b07c6ba7
parent fc02e8a4
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