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

Commit 592b9a06 authored by Narayan Kamath's avatar Narayan Kamath Committed by android-build-merger
Browse files

Merge "MediaProjectionManagerService: Use the right user for app lookups." into qt-dev

am: 1439a16e

Change-Id: Ic880b6bb1866958e1a59be1634eea186a1947e0c
parents a5e21f02 1439a16e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -282,13 +282,14 @@ public final class MediaProjectionManagerService extends SystemService
                throw new IllegalArgumentException("package name must not be empty");
            }

            final UserHandle callingUser = Binder.getCallingUserHandle();
            long callingToken = Binder.clearCallingIdentity();

            MediaProjection projection;
            try {
                ApplicationInfo ai;
                try {
                    ai = mPackageManager.getApplicationInfo(packageName, 0);
                    ai = mPackageManager.getApplicationInfoAsUser(packageName, 0, callingUser);
                } catch (NameNotFoundException e) {
                    throw new IllegalArgumentException("No package matching :" + packageName);
                }