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

Commit 8dd1a563 authored by Evan Severson's avatar Evan Severson
Browse files

Use callingUid not appId for permission check

The calling uid shouldn't be stripped of the user, this can cause the
permission check to fail if the calling app is from a secondary user.

Test: atest CtsPackageUninstallTestCases --user-type secondary_user
Fixes: 173622108
Change-Id: If19aa3bdf397a866d24c6fa2ff4a110eba802853
parent a2d72341
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3646,7 +3646,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
     */
    private static int checkCallingPermission(String permission) {
        return checkPermission(
                permission, Binder.getCallingPid(), UserHandle.getAppId(Binder.getCallingUid()));
                permission, Binder.getCallingPid(), Binder.getCallingUid());
    }

    /** This can be called with or without the global lock held. */