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

Commit 4a70ed12 authored by Makoto Onuki's avatar Makoto Onuki Committed by android-build-merger
Browse files

Relax isUserRunning check and allow in-profile calls am: 8198deac am: f29793a4

am: c6a4953a

Change-Id: I769cf8827fcc2bfbf952efb33e7529811a373a22
parents 28db62fb c6a4953a
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -21526,8 +21526,9 @@ public final class ActivityManagerService extends ActivityManagerNative
    @Override
    public boolean isUserRunning(int userId, int flags) {
        if (userId != UserHandle.getCallingUserId() && checkCallingPermission(
                INTERACT_ACROSS_USERS) != PackageManager.PERMISSION_GRANTED) {
        if (!mUserController.isSameProfileGroup(userId, UserHandle.getCallingUserId())
                && checkCallingPermission(INTERACT_ACROSS_USERS)
                    != PackageManager.PERMISSION_GRANTED) {
            String msg = "Permission Denial: isUserRunning() from pid="
                    + Binder.getCallingPid()
                    + ", uid=" + Binder.getCallingUid()
+3 −0
Original line number Diff line number Diff line
@@ -1474,6 +1474,9 @@ final class UserController {
    }

    boolean isSameProfileGroup(int callingUserId, int targetUserId) {
        if (callingUserId == targetUserId) {
            return true;
        }
        synchronized (mUserProfileGroupIdsSelfLocked) {
            int callingProfile = mUserProfileGroupIdsSelfLocked.get(callingUserId,
                    UserInfo.NO_PROFILE_GROUP_ID);