Merge "Screenshot freeform task when going to overview" into tm-qpr-dev am: f7474fa9a0

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

Change-Id: Ic812f072c7b63b2b81257e7e21cf65d881c42b63
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Ats Jenk
2022-10-26 17:07:18 +00:00
committed by Automerger Merge Worker

View File

@@ -1892,11 +1892,13 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
}
private void finishCurrentTransitionToRecents() {
if (mRecentsAnimationController != null
if (mRecentsView != null
&& mActivityInterface.getDesktopVisibilityController() != null
&& mActivityInterface.getDesktopVisibilityController().areFreeformTasksVisible()) {
mRecentsAnimationController.finish(true /* toRecents */,
() -> mStateCallback.setStateOnUiThread(STATE_CURRENT_TASK_FINISHED));
mRecentsView.switchToScreenshot(() -> {
mRecentsView.finishRecentsAnimation(true /* toRecents */, false /* shouldPip */,
() -> mStateCallback.setStateOnUiThread(STATE_CURRENT_TASK_FINISHED));
});
} else {
mStateCallback.setStateOnUiThread(STATE_CURRENT_TASK_FINISHED);
if (mRecentsAnimationController != null) {