Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 11f0f937 authored by Peter Li's avatar Peter Li Committed by Android (Google) Code Review
Browse files

Merge "Remove hack code for without cross user permission" into main

parents ced83430 99d72749
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2768,7 +2768,8 @@ public class ComputerEngine implements Computer {
            enforceCrossUserPermission(Binder.getCallingUid(), userId, false, false,
                    !isRecentsAccessingChildProfiles(Binder.getCallingUid(), userId),
                    "MATCH_ANY_USER flag requires INTERACT_ACROSS_USERS permission");
        } else if ((flags & PackageManager.MATCH_UNINSTALLED_PACKAGES) != 0
        } else if (!Flags.removeCrossUserPermissionHack()
                && (flags & PackageManager.MATCH_UNINSTALLED_PACKAGES) != 0
                && isCallerSystemUser
                && mUserManager.hasProfile(UserHandle.USER_SYSTEM)) {
            // If the caller wants all packages and has a profile associated with it,