Set resizing to false if no fling animation

While dobble taps gesture, it may moves the divider bar
meanwhile, it means we set resizing to true but didn't set it back
to false because position is same and no animation. We should set
resizing to false for such status.

Also fix such bug on legacy split screen. We call stopDragging with
no animation in some status, it should call setResizing false too.

Fix: 192635568
Test: Eanble stage split with any two apps and dobble tap on divider
      many times.
Change-Id: I170e3de347cc5fc19eaa1cd3d64922b2b631e550
This commit is contained in:
Tony Huang
2021-07-02 16:42:11 +08:00
parent 9b685c9eef
commit 3912b53d18
2 changed files with 6 additions and 1 deletions

View File

@@ -286,7 +286,11 @@ public final class SplitLayout {
}
private void flingDividePosition(int from, int to) {
if (from == to) return;
if (from == to) {
// No animation run, it should stop resizing here.
mSplitWindowManager.setResizingSplits(false);
return;
}
ValueAnimator animator = ValueAnimator
.ofInt(from, to)
.setDuration(250);

View File

@@ -460,6 +460,7 @@ public class DividerView extends FrameLayout implements OnTouchListener,
private void stopDragging() {
mHandle.setTouching(false, true /* animate */);
mWindowManager.setSlippery(true);
mWindowManagerProxy.setResizing(false);
releaseBackground();
}