From 553d9780122d1f905180527772a1da8c97db357e Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Fri, 2 Jul 2021 14:18:31 -0700 Subject: [PATCH] Fix crash when handling recents animation canceled - If Launcher finishes the animation, that also cleans up the screenshot on the server side, so we can skip calling it Fixes: 192684578 Test: N/a, adding a null check Change-Id: Ia6b99b4262e72f925e7d622ea8833d3c88252633 --- quickstep/src/com/android/quickstep/GestureState.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/quickstep/GestureState.java b/quickstep/src/com/android/quickstep/GestureState.java index a302a07bca..385b3b482e 100644 --- a/quickstep/src/com/android/quickstep/GestureState.java +++ b/quickstep/src/com/android/quickstep/GestureState.java @@ -364,7 +364,9 @@ public class GestureState implements RecentsAnimationCallbacks.RecentsAnimationL mStateCallback.setState(STATE_RECENTS_ANIMATION_ENDED); if (mRecentsAnimationCanceledSnapshot != null) { // Clean up the screenshot to finalize the recents animation cancel - mRecentsAnimationController.cleanupScreenshot(); + if (mRecentsAnimationController != null) { + mRecentsAnimationController.cleanupScreenshot(); + } mRecentsAnimationCanceledSnapshot = null; } }