mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 02:38:20 +00:00
Merge "Add null check for mRecentsView when recents animation is canceled" into udc-qpr-dev am: 2a1df8879f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/24499166 Change-Id: I47fae5b187a2bb2a50e0ff78ce9672cdd50ba6b3 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -518,20 +518,22 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
|
||||
// Set up a entire animation lifecycle callback to notify the current recents view when
|
||||
// the animation is canceled
|
||||
mGestureState.runOnceAtState(STATE_RECENTS_ANIMATION_CANCELED, () -> {
|
||||
HashMap<Integer, ThumbnailData> snapshots =
|
||||
mGestureState.consumeRecentsAnimationCanceledSnapshot();
|
||||
if (snapshots != null) {
|
||||
mRecentsView.switchToScreenshot(snapshots, () -> {
|
||||
if (mRecentsAnimationController != null) {
|
||||
mRecentsAnimationController.cleanupScreenshot();
|
||||
} else if (mDeferredCleanupRecentsAnimationController != null) {
|
||||
mDeferredCleanupRecentsAnimationController.cleanupScreenshot();
|
||||
mDeferredCleanupRecentsAnimationController = null;
|
||||
}
|
||||
});
|
||||
mRecentsView.onRecentsAnimationComplete();
|
||||
}
|
||||
});
|
||||
if (mRecentsView == null) return;
|
||||
|
||||
HashMap<Integer, ThumbnailData> snapshots =
|
||||
mGestureState.consumeRecentsAnimationCanceledSnapshot();
|
||||
if (snapshots != null) {
|
||||
mRecentsView.switchToScreenshot(snapshots, () -> {
|
||||
if (mRecentsAnimationController != null) {
|
||||
mRecentsAnimationController.cleanupScreenshot();
|
||||
} else if (mDeferredCleanupRecentsAnimationController != null) {
|
||||
mDeferredCleanupRecentsAnimationController.cleanupScreenshot();
|
||||
mDeferredCleanupRecentsAnimationController = null;
|
||||
}
|
||||
});
|
||||
mRecentsView.onRecentsAnimationComplete();
|
||||
}
|
||||
});
|
||||
|
||||
setupRecentsViewUi();
|
||||
mRecentsView.runOnPageScrollsInitialized(this::linkRecentsViewScroll);
|
||||
|
||||
Reference in New Issue
Block a user