services/tests/mockingservicestests/src/com/android/server/pm/SuspendPackagesBroadcastTest.kt
0 → 100644
+163
−0
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
To allows building the allow list before sending, this cl breaks
the original broadcast up from
[{
action: ACTION_PACKAGES_SUSPENDED,
extras: {EXTRA_SUSPENDED_PACKAGES: [com.app.a, com.app.b],
EXTRA_SUSPENDED_UIDS: [10342, 10358]}
}]
into the following two:
[{
action: ACTION_PACKAGES_SUSPENDED,
extras: {EXTRA_SUSPENDED_PACKAGES: [com.app.a],
EXTRA_SUSPENDED_UIDS: [10342]}
},
{
action: ACTION_PACKAGES_SUSPENDED,
extras: {EXTRA_SUSPENDED_PACKAGES: [com.app.b],
EXTRA_SUSPENDED_UIDS: [10358]}
}]
It also compares allow lists and merges the broadcast if allow
lists are the same.
Bug: 166181423
Test: atest AppEnumerationTests
Test: atest SuspendPackagesTest
Test: atest SuspendPackagesBroadcastTest
Change-Id: Ie3bb0f18d2b1b933a9a422d0850863b88179076b