diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java index 06ad1c03b8..a2054050f5 100644 --- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java @@ -427,12 +427,10 @@ public abstract class AbsSwipeUpHandler, HashMap snapshots = mGestureState.consumeRecentsAnimationCanceledSnapshot(); if (snapshots != null) { - mRecentsView.switchToScreenshot(snapshots, () -> { - if (mRecentsAnimationController != null) { - mRecentsAnimationController.cleanupScreenshot(); - } - }); mRecentsView.onRecentsAnimationComplete(); + if (mRecentsAnimationController != null) { + mRecentsAnimationController.cleanupScreenshot(); + } } }); diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index 8ecde1d1f0..d91e214137 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -605,7 +605,10 @@ public class Workspace extends PagedView // Recycle the QSB widget if (mQsb != null) { - ((ViewGroup) mQsb.getParent()).removeView(mQsb); + ViewGroup viewGroup = (ViewGroup) mQsb.getParent(); + if (viewGroup != null) { + viewGroup.removeView(mQsb); + } } // Remove the pages and clear the screen models