From 6368746a3c86878209dbcbe0a996cd5aaa252bbc Mon Sep 17 00:00:00 2001 From: Jerry Chang Date: Fri, 6 Aug 2021 09:45:55 +0800 Subject: [PATCH] Prevent NPE when resetting divider bar visibility Fix: 195325902 Test: atest com.android.launcher3.memory.MemoryTests#testActivityRecreation --rerun-until-failure Change-Id: I12c48fe2834a225c5f7d042be632ddd29135b7c5 --- 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 6249e6a01d..42c89fd006 100644 --- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java @@ -1534,7 +1534,9 @@ public abstract class AbsSwipeUpHandler, boolean wasVisible = mWasLauncherAlreadyVisible || mGestureStarted; mActivityInterface.onTransitionCancelled(wasVisible, mGestureState.getEndTarget()); - TaskViewUtils.setDividerBarShown(mRecentsAnimationTargets.nonApps, true); + if (mRecentsAnimationTargets != null) { + TaskViewUtils.setDividerBarShown(mRecentsAnimationTargets.nonApps, true); + } // Leave the pending invisible flag, as it may be used by wallpaper open animation. if (mActivity != null) {