summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2014-10-15 02:05:56 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-10-15 02:05:56 +0000
commitcf2c564987965be1241fe197106b3ec22b11b4b0 (patch)
treec329bae879902569a920f2a6f80af9777a059b71 /services
parent1a55dcceaa37d224312ab4b3e4ee31034fa3636d (diff)
parent9797880808320e3a7bae1f59bc7e0c5a13189e5f (diff)
downloadframeworks_base-cf2c564987965be1241fe197106b3ec22b11b4b0.zip
frameworks_base-cf2c564987965be1241fe197106b3ec22b11b4b0.tar.gz
frameworks_base-cf2c564987965be1241fe197106b3ec22b11b4b0.tar.bz2
am 97978808: Start cross profile intents as caller.
* commit '9797880808320e3a7bae1f59bc7e0c5a13189e5f': Start cross profile intents as caller.
Diffstat (limited to 'services')
-rwxr-xr-xservices/core/java/com/android/server/am/ActivityManagerService.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 8357366..8dfb321 100755
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -3561,7 +3561,7 @@ public final class ActivityManagerService extends ActivityManagerNative
@Override
public final int startActivityAsCaller(IApplicationThread caller, String callingPackage,
Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode,
- int startFlags, ProfilerInfo profilerInfo, Bundle options) {
+ int startFlags, ProfilerInfo profilerInfo, Bundle options, int userId) {
// This is very dangerous -- it allows you to perform a start activity (including
// permission grants) as any app that may launch one of your own activities. So
@@ -3599,11 +3599,15 @@ public final class ActivityManagerService extends ActivityManagerNative
targetPackage = sourceRecord.launchedFromPackage;
}
+ if (userId == UserHandle.USER_NULL) {
+ userId = UserHandle.getUserId(sourceRecord.app.uid);
+ }
+
// TODO: Switch to user app stacks here.
try {
int ret = mStackSupervisor.startActivityMayWait(null, targetUid, targetPackage, intent,
resolvedType, null, null, resultTo, resultWho, requestCode, startFlags, null,
- null, null, options, UserHandle.getUserId(sourceRecord.app.uid), null, null);
+ null, null, options, userId, null, null);
return ret;
} catch (SecurityException e) {
// XXX need to figure out how to propagate to original app.