Skip to content

Commit 029675e

Browse files
Amith YamasaniAndroid (Google) Code Review
authored andcommitted
Merge "Fix launching activity from a pending intent" into jb-mr1-dev
2 parents 2b7a0d0 + 7300dbe commit 029675e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

services/java/com/android/server/am/ActivityManagerService.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2539,7 +2539,6 @@ public final int startActivityInPackage(int uid,
25392539

25402540
// This is so super not safe, that only the system (or okay root)
25412541
// can do it.
2542-
int userId = Binder.getOrigCallingUser();
25432542
final int callingUid = Binder.getCallingUid();
25442543
if (callingUid != 0 && callingUid != Process.myUid()) {
25452544
throw new SecurityException(
@@ -2548,7 +2547,7 @@ public final int startActivityInPackage(int uid,
25482547

25492548
int ret = mMainStack.startActivityMayWait(null, uid, intent, resolvedType,
25502549
resultTo, resultWho, requestCode, startFlags,
2551-
null, null, null, null, options, userId);
2550+
null, null, null, null, options, UserHandle.getUserId(uid));
25522551
return ret;
25532552
}
25542553

0 commit comments

Comments
 (0)