diff --git a/quickstep/src/com/android/quickstep/SystemUiProxy.java b/quickstep/src/com/android/quickstep/SystemUiProxy.java
index 2200b35..139e923 100644
--- a/quickstep/src/com/android/quickstep/SystemUiProxy.java
+++ b/quickstep/src/com/android/quickstep/SystemUiProxy.java
@@ -628,14 +628,20 @@
         }
     }
 
-    public void startIntentsWithLegacyTransition(PendingIntent pendingIntent1, Bundle options1,
-            PendingIntent pendingIntent2, Bundle options2,
-            @SplitConfigurationOptions.StagePosition int sidePosition, float splitRatio,
-            RemoteAnimationAdapter adapter, InstanceId instanceId) {
+    /**
+     * Starts a pair of intents or shortcuts in split-screen using legacy transition. Passing a
+     * non-null shortcut info means to start the app as a shortcut.
+     */
+    public void startIntentsWithLegacyTransition(PendingIntent pendingIntent1,
+            @Nullable ShortcutInfo shortcutInfo1, @Nullable Bundle options1,
+            PendingIntent pendingIntent2, @Nullable ShortcutInfo shortcutInfo2,
+            @Nullable Bundle options2, @SplitConfigurationOptions.StagePosition int sidePosition,
+            float splitRatio, RemoteAnimationAdapter adapter, InstanceId instanceId) {
         if (mSystemUiProxy != null) {
             try {
-                mSplitScreen.startIntentsWithLegacyTransition(pendingIntent1, options1,
-                        pendingIntent2, options2, sidePosition, splitRatio, adapter, instanceId);
+                mSplitScreen.startIntentsWithLegacyTransition(pendingIntent1, shortcutInfo1,
+                        options1, pendingIntent2, shortcutInfo2, options2, sidePosition, splitRatio,
+                        adapter, instanceId);
             } catch (RemoteException e) {
                 Log.w(TAG, "Failed call startIntentsWithLegacyTransition");
             }
diff --git a/quickstep/src/com/android/quickstep/util/SplitSelectStateController.java b/quickstep/src/com/android/quickstep/util/SplitSelectStateController.java
index e5d54d7..1b2bfc9 100644
--- a/quickstep/src/com/android/quickstep/util/SplitSelectStateController.java
+++ b/quickstep/src/com/android/quickstep/util/SplitSelectStateController.java
@@ -261,8 +261,9 @@
                         getOppositeStagePosition(stagePosition), splitRatio, adapter,
                         shellInstanceId);
             } else {
-                mSystemUiProxy.startIntentsWithLegacyTransition(getPendingIntent(intent1),
-                        options1.toBundle(), getPendingIntent(intent2), null /* options2 */,
+                mSystemUiProxy.startIntentsWithLegacyTransition(
+                        getPendingIntent(intent1), getShortcutInfo(intent1), options1.toBundle(),
+                        getPendingIntent(intent2), getShortcutInfo(intent2), null /* options2 */,
                         stagePosition, splitRatio, adapter, shellInstanceId);
             }
         }
@@ -271,15 +272,13 @@
     private void launchIntentOrShortcut(Intent intent, ActivityOptions options1, int taskId,
             @StagePosition int stagePosition, float splitRatio, RemoteTransition remoteTransition,
             @Nullable InstanceId shellInstanceId) {
-        PendingIntent pendingIntent = getPendingIntent(intent);
-        final ShortcutInfo shortcutInfo = getShortcutInfo(intent,
-                pendingIntent.getCreatorUserHandle());
+        final ShortcutInfo shortcutInfo = getShortcutInfo(intent);
         if (shortcutInfo != null) {
             mSystemUiProxy.startShortcutAndTask(shortcutInfo,
                     options1.toBundle(), taskId, null /* options2 */, stagePosition,
                     splitRatio, remoteTransition, shellInstanceId);
         } else {
-            mSystemUiProxy.startIntentAndTask(pendingIntent, options1.toBundle(), taskId,
+            mSystemUiProxy.startIntentAndTask(getPendingIntent(intent), options1.toBundle(), taskId,
                     null /* options2 */, stagePosition, splitRatio, remoteTransition,
                     shellInstanceId);
         }
@@ -288,15 +287,13 @@
     private void launchIntentOrShortcutLegacy(Intent intent, ActivityOptions options1, int taskId,
             @StagePosition int stagePosition, float splitRatio, RemoteAnimationAdapter adapter,
             @Nullable InstanceId shellInstanceId) {
-        PendingIntent pendingIntent = getPendingIntent(intent);
-        final ShortcutInfo shortcutInfo = getShortcutInfo(intent,
-                pendingIntent.getCreatorUserHandle());
+        final ShortcutInfo shortcutInfo = getShortcutInfo(intent);
         if (shortcutInfo != null) {
             mSystemUiProxy.startShortcutAndTaskWithLegacyTransition(shortcutInfo,
                     options1.toBundle(), taskId, null /* options2 */, stagePosition,
                     splitRatio, adapter, shellInstanceId);
         } else {
-            mSystemUiProxy.startIntentAndTaskWithLegacyTransition(pendingIntent,
+            mSystemUiProxy.startIntentAndTaskWithLegacyTransition(getPendingIntent(intent),
                     options1.toBundle(), taskId, null /* options2 */, stagePosition, splitRatio,
                     adapter, shellInstanceId);
         }
@@ -322,7 +319,7 @@
     }
 
     @Nullable
-    private ShortcutInfo getShortcutInfo(Intent intent, UserHandle userHandle) {
+    private ShortcutInfo getShortcutInfo(Intent intent) {
         if (intent == null || intent.getPackage() == null) {
             return null;
         }
@@ -334,7 +331,7 @@
 
         try {
             final Context context = mContext.createPackageContextAsUser(
-                    intent.getPackage(), 0 /* flags */, userHandle);
+                    intent.getPackage(), 0 /* flags */, mUser);
             return new ShortcutInfo.Builder(context, shortcutId).build();
         } catch (PackageManager.NameNotFoundException e) {
             Log.w(TAG, "Failed to create a ShortcutInfo for " + intent.getPackage());
