Merge "Revert "Revert "Revert "Finish recents animation upon home rotation"""" into sc-dev am: a570b82aff

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

Change-Id: I5efc5bd520f52eeef97d24f2aa81bcb80af01d54
This commit is contained in:
Tracy Zhou
2021-05-04 21:37:46 +00:00
committed by Automerger Merge Worker
@@ -2481,15 +2481,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
@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();
@@ -3442,7 +3433,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
* 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);
}