Don't animate hotseat when launching if swipe up disabled

Bug: 78248316
Change-Id: Iaee33a81db5b46fc73d6e08ec1b109a1da842106
diff --git a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java b/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
index 06e5311..a3892f8 100644
--- a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
@@ -35,6 +35,7 @@
 import com.android.launcher3.DeviceProfile;
 import com.android.launcher3.Launcher;
 import com.android.launcher3.LauncherState;
+import com.android.quickstep.OverviewInteractionState;
 import com.android.quickstep.util.LayoutUtils;
 
 /**
@@ -114,6 +115,12 @@
     public AnimatorSet createAdjacentPageAnimForTaskLaunch(TaskView tv) {
         AnimatorSet anim = super.createAdjacentPageAnimForTaskLaunch(tv);
 
+        if (!OverviewInteractionState.getInstance(mActivity).isSwipeUpGestureEnabled()) {
+            // Hotseat doesn't move when opening recents with the button,
+            // so don't animate it here either.
+            return anim;
+        }
+
         float allAppsProgressOffscreen = ALL_APPS_PROGRESS_OFF_SCREEN;
         LauncherState state = mActivity.getStateManager().getState();
         if ((state.getVisibleElements(mActivity) & ALL_APPS_HEADER_EXTRA) != 0) {