diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
index 43be051..6646e1b 100644
--- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
+++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
@@ -981,7 +981,6 @@
                 mStateCallback.setState(STATE_SCALED_CONTROLLER_HOME | STATE_CAPTURE_SCREENSHOT);
                 // Notify swipe-to-home (recents animation) is finished
                 SystemUiProxy.INSTANCE.get(mContext).notifySwipeToHomeFinished();
-                LauncherSplitScreenListener.INSTANCE.getNoCreate().notifySwipingToHome();
                 break;
             case RECENTS:
                 mStateCallback.setState(STATE_SCALED_CONTROLLER_RECENTS | STATE_CAPTURE_SCREENSHOT
diff --git a/quickstep/src/com/android/quickstep/OverviewCommandHelper.java b/quickstep/src/com/android/quickstep/OverviewCommandHelper.java
index a7bdcc6..42f9eb6 100644
--- a/quickstep/src/com/android/quickstep/OverviewCommandHelper.java
+++ b/quickstep/src/com/android/quickstep/OverviewCommandHelper.java
@@ -32,7 +32,6 @@
 import com.android.launcher3.statemanager.StatefulActivity;
 import com.android.launcher3.util.RunnableList;
 import com.android.quickstep.RecentsAnimationCallbacks.RecentsAnimationListener;
-import com.android.quickstep.util.LauncherSplitScreenListener;
 import com.android.quickstep.views.RecentsView;
 import com.android.quickstep.views.TaskView;
 import com.android.systemui.shared.recents.model.ThumbnailData;
@@ -172,7 +171,6 @@
             }
             if (cmd.type == TYPE_HOME) {
                 mService.startActivity(mOverviewComponentObserver.getHomeIntent());
-                LauncherSplitScreenListener.INSTANCE.getNoCreate().notifySwipingToHome();
                 return true;
             }
         } else {
@@ -191,7 +189,6 @@
                     return launchTask(recents, getNextTask(recents), cmd);
                 case TYPE_HOME:
                     recents.startHome();
-                    LauncherSplitScreenListener.INSTANCE.getNoCreate().notifySwipingToHome();
                     return true;
             }
         }
diff --git a/quickstep/src/com/android/quickstep/TaskViewUtils.java b/quickstep/src/com/android/quickstep/TaskViewUtils.java
index 516ecd4..29f2123 100644
--- a/quickstep/src/com/android/quickstep/TaskViewUtils.java
+++ b/quickstep/src/com/android/quickstep/TaskViewUtils.java
@@ -170,11 +170,9 @@
         boolean isQuickSwitch = v.isEndQuickswitchCuj();
         v.setEndQuickswitchCuj(false);
 
-        boolean inLiveTileMode =
-                ENABLE_QUICKSTEP_LIVE_TILE.get() && v.getRecentsView().getRunningTaskIndex() != -1;
         final RemoteAnimationTargets targets =
                 new RemoteAnimationTargets(appTargets, wallpaperTargets, nonAppTargets,
-                        !ENABLE_SHELL_TRANSITIONS && inLiveTileMode ? MODE_CLOSING : MODE_OPENING);
+                        MODE_OPENING);
         final RemoteAnimationTargetCompat navBarTarget = targets.getNavBarRemoteAnimationTarget();
 
         SurfaceTransactionApplier applier = new SurfaceTransactionApplier(v);
@@ -276,7 +274,7 @@
                         }
                     }
                 });
-            } else if (inLiveTileMode) {
+            } else {
                 // There is no transition animation for app launch from recent in live tile mode so
                 // we have to trigger the navigation bar animation from system here.
                 final RecentsAnimationController controller =
diff --git a/quickstep/src/com/android/quickstep/util/LauncherSplitScreenListener.java b/quickstep/src/com/android/quickstep/util/LauncherSplitScreenListener.java
index 99efb39..affe625 100644
--- a/quickstep/src/com/android/quickstep/util/LauncherSplitScreenListener.java
+++ b/quickstep/src/com/android/quickstep/util/LauncherSplitScreenListener.java
@@ -11,8 +11,6 @@
 import com.android.launcher3.util.SplitConfigurationOptions.StageType;
 import com.android.launcher3.util.SplitConfigurationOptions.StagedSplitTaskPosition;
 import com.android.quickstep.SystemUiProxy;
-import com.android.systemui.shared.system.TaskStackChangeListener;
-import com.android.systemui.shared.system.TaskStackChangeListeners;
 import com.android.wm.shell.splitscreen.ISplitScreenListener;
 
 /**
@@ -20,9 +18,6 @@
  *
  * Use {@link #getRunningSplitTaskIds()} to determine which tasks, if any, are actively in
  * staged split.
- *
- * Use {@link #getPersistentSplitIds()} to know if tasks were in split screen before a quickswitch
- * gesture happened.
  */
 public class LauncherSplitScreenListener extends ISplitScreenListener.Stub {
 
@@ -34,21 +29,6 @@
     private final StagedSplitTaskPosition mMainStagePosition = new StagedSplitTaskPosition();
     private final StagedSplitTaskPosition mSideStagePosition = new StagedSplitTaskPosition();
 
-    private boolean mIsRecentsListFrozen = false;
-    private final TaskStackChangeListener mTaskStackListener = new TaskStackChangeListener() {
-        @Override
-        public void onRecentTaskListFrozenChanged(boolean frozen) {
-            super.onRecentTaskListFrozenChanged(frozen);
-            mIsRecentsListFrozen = frozen;
-
-            if (frozen) {
-                mPersistentGroupedIds = getRunningSplitTaskIds();
-            } else {
-                mPersistentGroupedIds = EMPTY_ARRAY;
-            }
-        }
-    };
-
     /**
      * Gets set to current split taskIDs whenever the task list is frozen, and set to empty array
      * whenever task list unfreezes. This also gets set to empty array whenever the user swipes to
@@ -68,26 +48,13 @@
     /** Also call {@link #destroy()} when done. */
     public void init() {
         SystemUiProxy.INSTANCE.getNoCreate().registerSplitScreenListener(this);
-        TaskStackChangeListeners.getInstance().registerTaskStackListener(mTaskStackListener);
     }
 
     public void destroy() {
         SystemUiProxy.INSTANCE.getNoCreate().unregisterSplitScreenListener(this);
-        TaskStackChangeListeners.getInstance().unregisterTaskStackListener(mTaskStackListener);
     }
 
     /**
-     * This method returns the active split taskIDs that were active if a user quickswitched from
-     * split screen to a fullscreen app as long as the recents task list remains frozen.
-     */
-    public int[] getPersistentSplitIds() {
-        if (mIsRecentsListFrozen) {
-            return mPersistentGroupedIds;
-        } else {
-            return getRunningSplitTaskIds();
-        }
-    }
-    /**
      * @return index 0 will be task in left/top position, index 1 in right/bottom position.
      *         Will return empty array if device is not in staged split
      */
@@ -141,17 +108,6 @@
         }
     }
 
-    /** Notifies SystemUi to remove any split screen state */
-    public void notifySwipingToHome() {
-        boolean hasSplitTasks = LauncherSplitScreenListener.INSTANCE.getNoCreate()
-                .getPersistentSplitIds().length > 0;
-        if (!hasSplitTasks) {
-            return;
-        }
-
-        mPersistentGroupedIds = EMPTY_ARRAY;
-    }
-
     private void resetTaskId(StagedSplitTaskPosition taskPosition) {
         taskPosition.taskId = -1;
     }
