Get visibility allow list before uninstalling package

The package removed broadcast should be only sent to the packages in
visibility allow list. However, current broadcast allow list is null
when uninstalling. This indicates that every package could receive
this broadcast.

Fix: 184010320
Test: atest PackageManagerTests AppsFilterTest AppEnumerationTests
Change-Id: I140bfa093dcc82980f671c60c973882546eaf899
This commit is contained in:
Jackal Guo
2021-03-30 17:08:08 +08:00
parent 948bd86481
commit 92e0459c04

View File

@@ -21463,6 +21463,8 @@ public class PackageManagerService extends IPackageManager.Stub
synchronized (mLock) {
if (outInfo != null) {
outInfo.uid = ps.appId;
outInfo.broadcastAllowList = mAppsFilter.getVisibilityAllowList(ps,
allUserHandles, mSettings.getPackagesLocked());
}
}