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

Commit f29793a4 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

Change-Id: I55a2badbfd89f65f56bdd75daa15b81ec46c0cdd
parents 755d3c31 8198deac
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -21553,8 +21553,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
@@ -1478,6 +1478,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);