Merge "Fix crash when handling recents animation canceled" into sc-dev

This commit is contained in:
Winson Chung 2021-07-08 21:21:37 +00:00 committed by Android (Google) Code Review
commit d489a4b6e9
1 changed files with 5 additions and 2 deletions

View File

@ -387,8 +387,11 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
mGestureState.runOnceAtState(STATE_RECENTS_ANIMATION_CANCELED, () -> {
ThumbnailData snapshot = mGestureState.consumeRecentsAnimationCanceledSnapshot();
if (snapshot != null) {
mRecentsView.switchToScreenshot(snapshot,
() -> mRecentsAnimationController.cleanupScreenshot());
mRecentsView.switchToScreenshot(snapshot, () -> {
if (mRecentsAnimationController != null) {
mRecentsAnimationController.cleanupScreenshot();
}
});
mRecentsView.onRecentsAnimationComplete();
}
});