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

Commit 7300dbeb authored by Amith Yamasani's avatar Amith Yamasani Committed by Android (Google) Code Review
Browse files

Fix launching activity from a pending intent

The creator of the pending intent is the user on which the activity
should be launched.

Change-Id: I733326ed8a5784985ac93a84ce91de4dda17c730
parent 81c304b9
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -2539,7 +2539,6 @@ public final class ActivityManagerService extends ActivityManagerNative
        
        // This is so super not safe, that only the system (or okay root)
        // can do it.
        int userId = Binder.getOrigCallingUser();
        final int callingUid = Binder.getCallingUid();
        if (callingUid != 0 && callingUid != Process.myUid()) {
            throw new SecurityException(
@@ -2548,7 +2547,7 @@ public final class ActivityManagerService extends ActivityManagerNative
        int ret = mMainStack.startActivityMayWait(null, uid, intent, resolvedType,
                resultTo, resultWho, requestCode, startFlags,
                null, null, null, null, options, userId);
                null, null, null, null, options, UserHandle.getUserId(uid));
        return ret;
    }