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

Commit d9866e80 authored by Winson Chung's avatar Winson Chung
Browse files

Add missing check for recents component caller

- Similar to the call to getActivityInfo(), also allow the recents
  component to make cross-user calls when fetching the application info
  for a given package.

Bug: 117553770
Test: Ensure that launcher can make this call when it is set as the
      recents component.

Change-Id: I13e7b8f087ed2306b7f7a4410ad98b81ff9d7ea7
parent 7ccf46be
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -4295,8 +4295,12 @@ public class PackageManagerService extends IPackageManager.Stub
            int filterCallingUid, int userId) {
        if (!sUserManager.exists(userId)) return null;
        flags = updateFlagsForApplication(flags, userId, packageName);
        if (!isRecentsAccessingChildProfiles(Binder.getCallingUid(), userId)) {
            mPermissionManager.enforceCrossUserPermission(Binder.getCallingUid(), userId,
                false /* requireFullPermission */, false /* checkShell */, "get application info");
                    false /* requireFullPermission */, false /* checkShell */,
                    "get application info");
        }
        // writer
        synchronized (mPackages) {