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

Commit 9c4226f5 authored by Amith Yamasani's avatar Amith Yamasani
Browse files

Use the calling uid, not app id

Use the calling uid, when checking permissions,
since the target app may not exist in the system user.

This allows apps in the work profile to request
BROADCAST_STICKY permission, for instance.

Fixes: 121274063
Test: Manually test failing apps in work profile
Change-Id: I326f504a482623a7db624b4d7779423c6a17e4d1
parent 9b317627
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5613,7 +5613,7 @@ public class ActivityManagerService extends IActivityManager.Stub
    int checkCallingPermission(String permission) {
        return checkPermission(permission,
                Binder.getCallingPid(),
                UserHandle.getAppId(Binder.getCallingUid()));
                Binder.getCallingUid());
    }
    /**