Skip to content
Commit 87457295 authored by Fabian Kozynski's avatar Fabian Kozynski
Browse files

Make unregister receiver "sync".

Before this CL, unregistering a receiver was done asynchronously in
BroadcastDispatcher. This meant that after a call to unregisterReceiver,
there was a period of time in which broadcasts may still be dispatched
for that receiver.

After this change, we mark receivers as pending removal, blocking any
received broadcast to be dispatched while its being removed.

Also, remove the double posting to the same handler thread. Instead, we
use the fact that we know that UserBroadcastDispatcher will only be
called from BroadcastDispatcher in the background thread to prevent
re-posting.

Fixes: 193941146
Test: atest SystemUITests
Test: everything seems to be working fine
Change-Id: I345f4d7ad918381188d553bd2b89643d11ae3d6c
parent 3fda2bf2
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