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

Commit b4c8bacb authored by Jerry Chang's avatar Jerry Chang Committed by Automerger Merge Worker
Browse files

Merge "Fix not releasing touching state of the handle on divider bar" into...

Merge "Fix not releasing touching state of the handle on divider bar" into sc-dev am: 6c2ffa95 am: 85337e28

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14540393

Change-Id: Ib81bcac2cd6cfbc478c5177eb915d3bcc9f35753
parents 63ba4d57 85337e28
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -131,11 +131,10 @@ public class DividerView extends FrameLayout implements View.OnTouchListener {
                break;
            case MotionEvent.ACTION_UP:
            case MotionEvent.ACTION_CANCEL:
                mVelocityTracker.addMovement(event);
                releaseTouching();

                if (!mMoving) break;

                mVelocityTracker.addMovement(event);
                mVelocityTracker.computeCurrentVelocity(1000 /* units */);
                final float velocity = isLandscape
                        ? mVelocityTracker.getXVelocity()
+5 −3
Original line number Diff line number Diff line
@@ -521,12 +521,14 @@ public class DividerView extends FrameLayout implements OnTouchListener,
                break;
            case MotionEvent.ACTION_UP:
            case MotionEvent.ACTION_CANCEL:
                mVelocityTracker.addMovement(event);

                if (!mMoving) break;
                if (!mMoving) {
                    stopDragging();
                    break;
                }

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