@@ -1430,6 +1430,21 @@ public ActivityResult execStartActivity(
14301430 */
14311431 public void execStartActivities (Context who , IBinder contextThread ,
14321432 IBinder token , Activity target , Intent [] intents , Bundle options ) {
1433+ execStartActivitiesAsUser (who , contextThread , token , target , intents , options ,
1434+ UserHandle .myUserId ());
1435+ }
1436+
1437+ /**
1438+ * Like {@link #execStartActivity(Context, IBinder, IBinder, Activity, Intent, int)},
1439+ * but accepts an array of activities to be started. Note that active
1440+ * {@link ActivityMonitor} objects only match against the first activity in
1441+ * the array.
1442+ *
1443+ * {@hide}
1444+ */
1445+ public void execStartActivitiesAsUser (Context who , IBinder contextThread ,
1446+ IBinder token , Activity target , Intent [] intents , Bundle options ,
1447+ int userId ) {
14331448 IApplicationThread whoThread = (IApplicationThread ) contextThread ;
14341449 if (mActivityMonitors != null ) {
14351450 synchronized (mSync ) {
@@ -1453,7 +1468,8 @@ public void execStartActivities(Context who, IBinder contextThread,
14531468 resolvedTypes [i ] = intents [i ].resolveTypeIfNeeded (who .getContentResolver ());
14541469 }
14551470 int result = ActivityManagerNative .getDefault ()
1456- .startActivities (whoThread , intents , resolvedTypes , token , options );
1471+ .startActivities (whoThread , intents , resolvedTypes , token , options ,
1472+ userId );
14571473 checkStartActivityResult (result , intents [0 ]);
14581474 } catch (RemoteException e ) {
14591475 }
0 commit comments