Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 68f6150e authored by Wale Ogunwale's avatar Wale Ogunwale Committed by android-build-merger
Browse files

Merge "Only resize task when divider is released" into nyc-dev

am: c0373595

* commit 'c0373595':
  Only resize task when divider is released
parents 4261a095 c0373595
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -380,10 +380,9 @@ public class DividerView extends FrameLayout implements OnTouchListener,
                    mMoving = true;
                }
                if (mMoving && mDockSide != WindowManager.DOCKED_INVALID) {
                    int position = calculatePosition(x, y);
                    SnapTarget snapTarget = mSnapAlgorithm.calculateSnapTarget(position,
                            0 /* velocity */, false /* hardDismiss */);
                    resizeStack(calculatePosition(x, y), snapTarget.position, snapTarget);
                    SnapTarget snapTarget = mSnapAlgorithm.calculateSnapTarget(
                            mStartPosition, 0 /* velocity */, false /* hardDismiss */);
                    resizeStack(calculatePosition(x, y), mStartPosition, snapTarget);
                }
                break;
            case MotionEvent.ACTION_UP:
@@ -393,6 +392,13 @@ public class DividerView extends FrameLayout implements OnTouchListener,
                x = (int) event.getRawX();
                y = (int) event.getRawY();

                if (mMoving && mDockSide != WindowManager.DOCKED_INVALID) {
                    int position = calculatePosition(x, y);
                    SnapTarget snapTarget = mSnapAlgorithm.calculateSnapTarget(position,
                            0 /* velocity */, false /* hardDismiss */);
                    resizeStack(calculatePosition(x, y), snapTarget.position, snapTarget);
                }

                mVelocityTracker.computeCurrentVelocity(1000);
                int position = calculatePosition(x, y);
                stopDragging(position, isHorizontalDivision() ? mVelocityTracker.getYVelocity()