Prevent NPE when resetting divider bar visibility

Fix: 195325902
Test: atest
com.android.launcher3.memory.MemoryTests#testActivityRecreation
--rerun-until-failure

Change-Id: I12c48fe2834a225c5f7d042be632ddd29135b7c5
This commit is contained in:
Jerry Chang 2021-08-06 09:45:55 +08:00
parent b999186b9e
commit 6368746a3c
1 changed files with 3 additions and 1 deletions

View File

@ -1534,7 +1534,9 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
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) {