From 7a668168da9962b6a9f408e6f2f7465da1c492ca Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Tue, 20 Apr 2021 21:05:05 -0700 Subject: [PATCH] Add null check when resetting animation - resetStateForAnimationCancel() can be called before launcher is present Bug: 185945504 Test: Manual Change-Id: I19525b12e8b179103b6081a8aa554dbe2ebc5ba5 --- quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java index 75992342aa..1a732f0955 100644 --- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java @@ -1389,7 +1389,9 @@ public abstract class AbsSwipeUpHandler, mActivityInterface.onTransitionCancelled(wasVisible); // Leave the pending invisible flag, as it may be used by wallpaper open animation. - mActivity.clearForceInvisibleFlag(INVISIBLE_BY_STATE_HANDLER); + if (mActivity != null) { + mActivity.clearForceInvisibleFlag(INVISIBLE_BY_STATE_HANDLER); + } } protected void switchToScreenshot() {