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

Commit bb276a41 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Don't save touch location as a resting position." into rvc-dev am: d70e938d

Change-Id: I4e1d64df84f36e12e4b49bb5befd8f97924edbd1
parents edd9c878 d70e938d
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -691,12 +691,22 @@ public class StackAnimationController extends
                PhysicsAnimationLayout.getReadablePropertyName(property),
                finalPosition));

        // Whether we're springing towards the touch location, rather than to a position on the
        // sides of the screen.
        final boolean isSpringingTowardsTouch = mSpringToTouchOnNextMotionEvent;

        StackPositionProperty firstBubbleProperty = new StackPositionProperty(property);
        SpringAnimation springAnimation =
                new SpringAnimation(this, firstBubbleProperty)
                        .setSpring(spring)
                        .addEndListener((dynamicAnimation, b, v, v1) -> {
                            if (!isSpringingTowardsTouch) {
                                // If we're springing towards the touch position, don't save the
                                // resting position - the touch location is not a valid resting
                                // position. We'll set this when the stack springs to the left or
                                // right side of the screen after the touch gesture ends.
                                mRestingStackPosition.set(mStackPosition);
                            }

                            if (after != null) {
                                for (Runnable callback : after) {