summaryrefslogtreecommitdiffstats
path: root/core/java/android/app/Instrumentation.java
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2012-09-25 09:36:28 -0700
committerJean-Baptiste Queru <jbq@google.com>2012-09-25 09:36:32 -0700
commit7951c459aefeb012638477b762e19b792ecbe009 (patch)
tree7a9625e8186f9e040a2daa3121f4189feb1685ac /core/java/android/app/Instrumentation.java
parenta5e1d21f566c8df750d766c76f6a99432a703c5e (diff)
parentea7e91514ee1968d15713e82a5cca745e2c46a05 (diff)
downloadframeworks_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.java18
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) {
}