diff options
author | Jean-Baptiste Queru <jbq@google.com> | 2012-09-25 09:36:28 -0700 |
---|---|---|
committer | Jean-Baptiste Queru <jbq@google.com> | 2012-09-25 09:36:32 -0700 |
commit | 7951c459aefeb012638477b762e19b792ecbe009 (patch) | |
tree | 7a9625e8186f9e040a2daa3121f4189feb1685ac /core/java/android/app/Instrumentation.java | |
parent | a5e1d21f566c8df750d766c76f6a99432a703c5e (diff) | |
parent | ea7e91514ee1968d15713e82a5cca745e2c46a05 (diff) | |
download | frameworks_base-7951c459aefeb012638477b762e19b792ecbe009.zip frameworks_base-7951c459aefeb012638477b762e19b792ecbe009.tar.gz frameworks_base-7951c459aefeb012638477b762e19b792ecbe009.tar.bz2 |
Merge into jb-mr1-dev
Change-Id: Ifc2328e30a52c2baebc1322c9b161104dcf21618
Diffstat (limited to 'core/java/android/app/Instrumentation.java')
-rw-r--r-- | core/java/android/app/Instrumentation.java | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/core/java/android/app/Instrumentation.java b/core/java/android/app/Instrumentation.java index ee4e964..e0856ae 100644 --- a/core/java/android/app/Instrumentation.java +++ b/core/java/android/app/Instrumentation.java @@ -1430,6 +1430,21 @@ public class Instrumentation { */ public void execStartActivities(Context who, IBinder contextThread, IBinder token, Activity target, Intent[] intents, Bundle options) { + execStartActivitiesAsUser(who, contextThread, token, target, intents, options, + UserHandle.myUserId()); + } + + /** + * Like {@link #execStartActivity(Context, IBinder, IBinder, Activity, Intent, int)}, + * but accepts an array of activities to be started. Note that active + * {@link ActivityMonitor} objects only match against the first activity in + * the array. + * + * {@hide} + */ + public void execStartActivitiesAsUser(Context who, IBinder contextThread, + IBinder token, Activity target, Intent[] intents, Bundle options, + int userId) { IApplicationThread whoThread = (IApplicationThread) contextThread; if (mActivityMonitors != null) { synchronized (mSync) { @@ -1453,7 +1468,8 @@ public class Instrumentation { resolvedTypes[i] = intents[i].resolveTypeIfNeeded(who.getContentResolver()); } int result = ActivityManagerNative.getDefault() - .startActivities(whoThread, intents, resolvedTypes, token, options); + .startActivities(whoThread, intents, resolvedTypes, token, options, + userId); checkStartActivityResult(result, intents[0]); } catch (RemoteException e) { } |