Finish the recents animation upon home rotation

Fixes: 184054813
Test: manual
Change-Id: I32eba85563b83ee9738696c526a1546008cd3a5d
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index dfe0c43..b5e3455 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -2592,6 +2592,16 @@
     @Override
     protected void onConfigurationChanged(Configuration newConfig) {
         super.onConfigurationChanged(newConfig);
+        if (LIVE_TILE.get()) {
+            switchToScreenshot(
+                    () -> finishRecentsAnimation(true /* toRecents */,
+                            this::onConfigurationChangedInternal));
+        } else {
+            onConfigurationChangedInternal();
+        }
+    }
+
+    private void onConfigurationChangedInternal() {
         final int rotation = mActivity.getDisplay().getRotation();
         if (mOrientationState.setRecentsRotation(rotation)) {
             updateOrientationHandler();