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

Commit 1b652fd9 authored by hyok.kim's avatar hyok.kim Committed by Vishnu Nair
Browse files

[wm]: DividerSnapAlgorithm doesn't consider vertical divider

Consider orientation when checking new snapTarget's position
 meets minimal size

Test: atest WmTests:DockedStackDividerControllerTests
Bug: 129522552
Change-Id: I70db9edada07df8aeb24dfaea1e9d4f6e1d69899
parent 3a43b8b8
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -297,10 +297,10 @@ public class DividerSnapAlgorithm {

    private void addNonDismissingTargets(boolean isHorizontalDivision, int topPosition,
            int bottomPosition, int dividerMax) {
        maybeAddTarget(topPosition, topPosition - mInsets.top);
        maybeAddTarget(topPosition, topPosition - getStartInset());
        addMiddleTarget(isHorizontalDivision);
        maybeAddTarget(bottomPosition, dividerMax - mInsets.bottom
                - (bottomPosition + mDividerSize));
        maybeAddTarget(bottomPosition,
                dividerMax - getEndInset() - (bottomPosition + mDividerSize));
    }

    private void addFixedDivisionTargets(boolean isHorizontalDivision, int dividerMax) {