Merge "Allow the system recents component to fetch info for user and profiles" into pi-dev

This commit is contained in:
Winson Chung
2018-06-05 18:12:16 +00:00
committed by Android (Google) Code Review

View File

@@ -4789,7 +4789,8 @@ public class PackageManagerService extends IPackageManager.Stub
// require the permission to be held; the calling uid and given user id referring
// to the same user is not sufficient
mPermissionManager.enforceCrossUserPermission(
Binder.getCallingUid(), userId, false, false, true,
Binder.getCallingUid(), userId, false, false,
!isRecentsAccessingChildProfiles(Binder.getCallingUid(), userId),
"MATCH_ANY_USER flag requires INTERACT_ACROSS_USERS permission at "
+ Debug.getCallers(5));
} else if ((flags & PackageManager.MATCH_UNINSTALLED_PACKAGES) != 0 && isCallerSystemUser