Prevent showing divider if launcher was never shown
* With stashing recents animation gets cancelled
almost instantly, so there's no point trying to
"show" the divider bar if it was never hidden
* We can use launcher showing as a good enough
proxy for whether the divider bar was ever hidden
to begin with
Fixes: 230825541
Test: Stashing/unstashing didn't cause crash
Change-Id: I3abc4ecf3605a66e67db971ae14aa6ec493d8f32
diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
index d676f7d..6ee95ab 100644
--- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
+++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
@@ -1676,7 +1676,7 @@
boolean wasVisible = mWasLauncherAlreadyVisible || mGestureStarted;
mActivityInterface.onTransitionCancelled(wasVisible, mGestureState.getEndTarget());
- if (mRecentsAnimationTargets != null) {
+ if (mRecentsAnimationTargets != null && wasVisible) {
setDividerShown(true /* shown */, true /* immediate */);
}