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

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

Merge "MediaProjectionManagerService: Use the right user for app lookups."...

Merge "MediaProjectionManagerService: Use the right user for app lookups." into qt-dev am: 1439a16e
am: 592b9a06

Change-Id: Ieb7a7ecc9f9cefeac001883e5f012a3add276008
parents 5993afc4 592b9a06
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);
                }