Merge "Finish recents animation upon home rotation" into sc-dev
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();