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

Commit 99d72749 authored by lpeter's avatar lpeter
Browse files

Remove hack code for without cross user permission

Refer to the comment of b/363324203, the launcher team is
doing some refactoring on their end which will happen in
the next two weeks. The hack code can be removed after
merging launcher team fix.

Flag: android.content.pm.remove_cross_user_permission_hack

Bug: 332664521
Test: atest PackageManagerMatchAnyUserFlagTest
Change-Id: I4b6b8383860d56ea257dc5bf676bbb0d1c39e1a1
parent bc57d803
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,