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

Skip to content
Commit 7fdd90af authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Complete cleanup broadcast receivers of target user

If a broadcast is sending to all users, the receivers of target
user should also be cleaned.

--------------------------------------
 Case |   Send to   |  Clean target  |
  1   |   All users |    All users   |
  2   |   All users |    One user    | <- Fix this.
  3   |   One user  |    All users   |
  4   |   One user  |    One user    |
--------------------------------------

Issue case:
Assume a package X is installed on user A, B (or even only A).
X declared a manifest receiver which responds to an user-all
broadcast(e.g. wifi state change). When the broadcast is sending,
some events trigger force-stop the package X on user A, the broadcast
in queue does not be cleaned and X still receives the broadcast.

Bug: 78883341
Test: atest FrameworksServicesTests:com.android.server.am.BroadcastRecordTest
Change-Id: I9de3319ecd1d4c23f81c28f29b3a7b0c5ffacb16
parent 8d18f0cf
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