Toggling minimized state with overview moves divider to correct position
When docking any app with overview on the bottom and continuously press
the overview button would not cause the position before minimized
variable to record an incorrect position. Instead only record when not
animating so that the original position is kept. Then after unminimizing
the docked stack, it will return back to the original position that was
recorded.
Change-Id: Ia9da24dcb2a5be1f10be3797007e02b1a1425345
Fixes: 35642296
Test: manual
diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java b/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java
index da56e62..90c65580 100644
--- a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java
+++ b/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java
@@ -767,7 +767,7 @@
mDockedStackMinimized = minimized;
} else if (mDockedStackMinimized != minimized) {
mIsInMinimizeInteraction = true;
- if (minimized) {
+ if (minimized && (mCurrentAnimator == null || !mCurrentAnimator.isRunning())) {
mDividerPositionBeforeMinimized = getCurrentPosition();
}
mMinimizedSnapAlgorithm = null;