diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java index 92e8268570..761299630c 100644 --- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java @@ -394,6 +394,9 @@ public abstract class AbsSwipeUpHandler, if (mStateCallback.hasStates(STATE_HANDLER_INVALIDATED)) { return; } + // RecentsView never updates the display rotation until swipe-up, force update + // RecentsOrientedState before passing to TaskViewSimulator. + mRecentsView.updateRecentsRotation(); mTaskViewSimulator.setOrientationState(mRecentsView.getPagedViewOrientedState()); // If we've already ended the gesture and are going home, don't prepare recents UI, diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index 342313d78b..f897d35e33 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -2641,19 +2641,20 @@ public abstract class RecentsView finishRecentsAnimation(true /* toRecents */, - this::onConfigurationChangedInternal)); + this::updateRecentsRotation)); mEnableDrawingLiveTile = false; } else { - onConfigurationChangedInternal(); + updateRecentsRotation(); } mOrientation = newConfig.orientation; } - private void onConfigurationChangedInternal() { + /** + * Updates {@link RecentsOrientedState}'s cached RecentsView rotation. + */ + public void updateRecentsRotation() { final int rotation = mActivity.getDisplay().getRotation(); - if (mOrientationState.setRecentsRotation(rotation)) { - updateOrientationHandler(); - } + mOrientationState.setRecentsRotation(rotation); } public void setLayoutRotation(int touchRotation, int displayRotation) {