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

Commit 3b4ea4ae authored by Chavi Weingarten's avatar Chavi Weingarten Committed by android-build-merger
Browse files

Merge "Set snapTargetBeforeMinimized to middle target if position is negative" into pi-dev

am: 5e86c3c2

Change-Id: Iaec2e71f18816581ffd2172247512cfcc2810306
parents e17fed34 5e86c3c2
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -592,7 +592,16 @@ public class DividerView extends FrameLayout implements OnTouchListener,

            // Record last snap target the divider moved to
            if (mHomeStackResizable && !mIsInMinimizeInteraction) {
                saveSnapTargetBeforeMinimized(snapTarget);
                // The last snapTarget position can be negative when the last divider position was
                // offscreen. In that case, save the middle (default) SnapTarget so calculating next
                // position isn't negative.
                final SnapTarget saveTarget;
                if (snapTarget.position < 0) {
                    saveTarget = mSnapAlgorithm.getMiddleTarget();
                } else {
                    saveTarget = snapTarget;
                }
                saveSnapTargetBeforeMinimized(saveTarget);
            }
        };
        Runnable notCancelledEndAction = () -> {