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

Commit 4536c2fc authored by Alex Chau's avatar Alex Chau
Browse files

Apply/reset split scroll offset regardless of previous state

- Also do the same in setState without animation

Fix: 208605204
Test: Exit split screen and enter overview
Change-Id: I34dd102527dffa90925b6f0fd22465f1fe6e819c
parent a3074925
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -66,6 +66,12 @@ public final class RecentsViewStateController extends
        // In Overview, we may be layering app surfaces behind Launcher, so we need to notify
        // DepthController to prevent optimizations which might occlude the layers behind
        mLauncher.getDepthController().setHasContentBehindLauncher(state.overviewUi);

        if (isSplitSelectionState(state)) {
            mRecentsView.applySplitPrimaryScrollOffset();
        } else {
            mRecentsView.resetSplitPrimaryScrollOffset();
        }
    }

    @Override
@@ -90,8 +96,10 @@ public final class RecentsViewStateController extends
        LauncherState currentState = mLauncher.getStateManager().getState();
        if (isSplitSelectionState(toState) && !isSplitSelectionState(currentState)) {
            builder.add(mRecentsView.createSplitSelectInitAnimation().buildAnim());
        }
        if (isSplitSelectionState(toState)) {
            mRecentsView.applySplitPrimaryScrollOffset();
        } else if (!isSplitSelectionState(toState) && isSplitSelectionState(currentState)) {
        } else {
            mRecentsView.resetSplitPrimaryScrollOffset();
        }