diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/util/TaskViewSimulator.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/util/TaskViewSimulator.java
index 46013d3..c9ed498 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/util/TaskViewSimulator.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/util/TaskViewSimulator.java
@@ -103,6 +103,7 @@
         mSizeStrategy = sizeStrategy;
 
         mOrientationState = new RecentsOrientedState(context, sizeStrategy, i -> { });
+        mOrientationState.setGestureActive(true);
 
         mCurrentFullscreenParams = new FullscreenDrawParams(context);
         mPageSpacing = context.getResources().getDimensionPixelSize(R.dimen.recents_page_spacing);
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java
index 1a9bb85..9c25b24 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java
@@ -1005,7 +1005,9 @@
         mDwbToastShown = false;
         mActivity.getSystemUiController().updateUiState(UI_STATE_OVERVIEW, 0);
         LayoutUtils.setViewEnabled(mActionsView, true);
-        mOrientationState.setGestureActive(false);
+        if (mOrientationState.setGestureActive(false)) {
+            updateOrientationHandler();
+        }
     }
 
     public @Nullable TaskView getRunningTaskView() {
@@ -1043,7 +1045,10 @@
      */
     public void onGestureAnimationStart(RunningTaskInfo runningTaskInfo) {
         // This needs to be called before the other states are set since it can create the task view
-        mOrientationState.setGestureActive(true);
+        if (mOrientationState.setGestureActive(true)) {
+            updateOrientationHandler();
+        }
+
         showCurrentTask(runningTaskInfo);
         setEnableFreeScroll(false);
         setEnableDrawingLiveTile(false);
@@ -1106,7 +1111,9 @@
      * Called when a gesture from an app has finished.
      */
     public void onGestureAnimationEnd() {
-        mOrientationState.setGestureActive(false);
+        if (mOrientationState.setGestureActive(false)) {
+            updateOrientationHandler();
+        }
 
         setOnScrollChangeListener(null);
         setEnableFreeScroll(true);
diff --git a/quickstep/src/com/android/quickstep/util/RecentsOrientedState.java b/quickstep/src/com/android/quickstep/util/RecentsOrientedState.java
index b359f0f..d822b6c 100644
--- a/quickstep/src/com/android/quickstep/util/RecentsOrientedState.java
+++ b/quickstep/src/com/android/quickstep/util/RecentsOrientedState.java
@@ -188,8 +188,9 @@
     /**
      * Sets if the swipe up gesture is currently running or not
      */
-    public void setGestureActive(boolean isGestureActive) {
+    public boolean setGestureActive(boolean isGestureActive) {
         setFlag(FLAG_SWIPE_UP_NOT_RUNNING, !isGestureActive);
+        return update(mTouchRotation, mDisplayRotation);
     }
 
     /**
@@ -202,27 +203,19 @@
      */
     public boolean update(
             @SurfaceRotation int touchRotation, @SurfaceRotation int displayRotation) {
-        int recentsActivityRotation = inferRecentsActivityRotation(displayRotation);
-        if (mDisplayRotation == displayRotation
-                && mTouchRotation == touchRotation
-                && mRecentsActivityRotation == recentsActivityRotation) {
-            return false;
-        }
-
-        mRecentsActivityRotation = recentsActivityRotation;
+        mRecentsActivityRotation = inferRecentsActivityRotation(displayRotation);
         mDisplayRotation = displayRotation;
         mTouchRotation = touchRotation;
         mPreviousRotation = touchRotation;
 
-        if (mRecentsActivityRotation == mTouchRotation || canRecentsActivityRotate()) {
+        PagedOrientationHandler oldHandler = mOrientationHandler;
+        if (mRecentsActivityRotation == mTouchRotation
+                || (canRecentsActivityRotate() && (mFlags & FLAG_SWIPE_UP_NOT_RUNNING) != 0)) {
             mOrientationHandler = PagedOrientationHandler.PORTRAIT;
             if (DEBUG) {
                 Log.d(TAG, "current RecentsOrientedState: " + this);
             }
-            return true;
-        }
-
-        if (mTouchRotation == ROTATION_90) {
+        } else if (mTouchRotation == ROTATION_90) {
             mOrientationHandler = PagedOrientationHandler.LANDSCAPE;
         } else if (mTouchRotation == ROTATION_270) {
             mOrientationHandler = PagedOrientationHandler.SEASCAPE;
@@ -232,7 +225,7 @@
         if (DEBUG) {
             Log.d(TAG, "current RecentsOrientedState: " + this);
         }
-        return true;
+        return oldHandler != mOrientationHandler;
     }
 
     @SurfaceRotation
