Merge "Apply package visibility in getPackageForUid for shared UID apps" into sc-dev

This commit is contained in:
Jackal Guo
2021-02-03 06:57:20 +00:00
committed by Android (Google) Code Review

View File

@@ -3863,7 +3863,8 @@ public class PackageManagerService extends IPackageManager.Stub
int i = 0;
for (int index = 0; index < N; index++) {
final PackageSetting ps = sus.packages.valueAt(index);
if (ps.getInstalled(userId)) {
if (ps.getInstalled(userId)
&& !shouldFilterApplicationLocked(ps, callingUid, userId)) {
res[i++] = ps.name;
}
}