Revert "Enfore cross user permission to getPackagesForUid"

This reverts commit 1dafc3859a.

Reason for revert: Causes bugs https://b.corp.google.com/issues/179465628 and https://b.corp.google.com/issues/179506602

Fixes: 179506602
Fixes: 179465628
Fixes: 179460585

Change-Id: I0596e45484638e33baccec834a8adf2dfa9f4a4d
This commit is contained in:
Alex Kershaw
2021-02-08 10:15:55 +00:00
parent 1dafc3859a
commit d5bc510fc8

View File

@@ -3845,8 +3845,6 @@ public class PackageManagerService extends IPackageManager.Stub
final boolean isCallerInstantApp = getInstantAppPackageName(callingUid) != null;
final int userId = UserHandle.getUserId(uid);
final int appId = UserHandle.getAppId(uid);
enforceCrossUserPermission(callingUid, userId,
/* requireFullPermission */ false, /* checkShell */ false, "getPackagesForUid");
return getPackagesForUidInternalBody(callingUid, userId, appId, isCallerInstantApp);
}