Apply package visibility in getPackageForUid for shared UID apps
Add package visibility filtering to the implementation in the branching for shared UID. Bug: 167656333 Test: CtsAppEnumerationTestCases Change-Id: Ic1a40bfad53ac4d9110cef385b771fd7e9ccde3a
This commit is contained in:
@@ -3862,7 +3862,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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user