Skip to content
Commit a0c38a4b authored by Rhed Jao's avatar Rhed Jao
Browse files

Applies package visibility for the broadcast of suspended packages

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
parent 30664e5e
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