Merge "Finish recents animation upon home rotation" into sc-dev am: 1969cd154e

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14260273

Change-Id: Id0fdb407502c8647b6ce8dfd02fae1b9a4e916af
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index 150ae02..e4fa1aa 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -2340,6 +2340,15 @@
     @Override
     protected void onConfigurationChanged(Configuration newConfig) {
         super.onConfigurationChanged(newConfig);
+        if (LIVE_TILE.get() && mRunningTaskId != -1) {
+            switchToScreenshot(
+                    () -> finishRecentsAnimation(true, this::onConfigurationChangedInternal));
+        } else {
+            onConfigurationChangedInternal();
+        }
+    }
+
+    private void onConfigurationChangedInternal() {
         final int rotation = mActivity.getDisplay().getRotation();
         if (mOrientationState.setRecentsRotation(rotation)) {
             updateOrientationHandler();