Revert "Revert "Revert "Finish recents animation upon home rotation"""

This reverts commit ef7b4d5dae976c1c6f4dbf5e43d6ab020361aa3a.

Reason for revert: Possibly broke a test
Bug: 187112839

Change-Id: I16ac2a155af9a0ae2ea60f55c52e0b3bf4307089
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index 1a0a1a4..e5ce950 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -2486,15 +2486,6 @@
     @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();
@@ -3447,7 +3438,7 @@
      * capturing the snapshot at the same time.
      */
     public void switchToScreenshot(Runnable onFinishRunnable) {
-        switchToScreenshot(mRecentsAnimationController == null || mRunningTaskId == -1 ? null
+        switchToScreenshot(mRunningTaskId == -1 ? null
                 : mRecentsAnimationController.screenshotTask(mRunningTaskId), onFinishRunnable);
     }