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
3 files changed