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

Commit 39da1f78 authored by Alex Chau's avatar Alex Chau
Browse files

Fix TaskView jumping caused by split select

- Never apply split select translation to grid overview, instead use dismiss translation to make space to split placeholder to minimize motion and avoid janky double movement
- Ensures snapping to last task for end of grid split cases
- Adjust mCurrentPageScrollDiff due to coordinate shift
- Use longGridRowWidthDiff to shift all task to make space for split placeholder
- Also fixed a bug that split translation isn't reset if entering overview immediately after exit

Bug: 200537815
Test: manual
Change-Id: Ie1b57c34ce4bb079f898ba5b7c3464a714021847
parent 85da1db1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ public class SplitScreenSelectState extends OverviewState {
    public float getSplitSelectTranslation(Launcher launcher) {
        RecentsView recentsView = launcher.getOverviewPanel();
        int splitPosition = recentsView.getSplitPlaceholder().getActiveSplitStagePosition();
        if (!recentsView.shouldShiftThumbnailsForSplitSelect(splitPosition)) {
        if (!recentsView.shouldShiftThumbnailsForSplitSelect()) {
            return 0f;
        }
        PagedOrientationHandler orientationHandler = recentsView.getPagedOrientationHandler();
+4 −4
Original line number Diff line number Diff line
@@ -202,6 +202,10 @@ public class FallbackRecentsView extends RecentsView<RecentsActivity, RecentsSta

    @Override
    public void onStateTransitionStart(RecentsState toState) {
        if (toState == HOME) {
            // Clean-up logic that occurs when recents is no longer in use/visible.
            reset();
        }
        setOverviewStateEnabled(true);
        setOverviewGridEnabled(toState.displayOverviewTasksAsGrid(mActivity.getDeviceProfile()));
        setOverviewFullscreenEnabled(toState.isFullScreen());
@@ -210,10 +214,6 @@ public class FallbackRecentsView extends RecentsView<RecentsActivity, RecentsSta

    @Override
    public void onStateTransitionComplete(RecentsState finalState) {
        if (finalState == HOME) {
            // Clean-up logic that occurs when recents is no longer in use/visible.
            reset();
        }
        setOverlayEnabled(finalState == DEFAULT || finalState == MODAL_TASK);
        setFreezeViewVisibility(false);
    }
+4 −4
Original line number Diff line number Diff line
@@ -90,6 +90,10 @@ public class LauncherRecentsView extends RecentsView<BaseQuickstepLauncher, Laun

    @Override
    public void onStateTransitionStart(LauncherState toState) {
        if (toState == NORMAL || toState == SPRING_LOADED) {
            // Clean-up logic that occurs when recents is no longer in use/visible.
            reset();
        }
        setOverviewStateEnabled(toState.overviewUi);
        setOverviewGridEnabled(toState.displayOverviewTasksAsGrid(mActivity.getDeviceProfile()));
        setOverviewFullscreenEnabled(toState.getOverviewFullscreenProgress() == 1);
@@ -98,10 +102,6 @@ public class LauncherRecentsView extends RecentsView<BaseQuickstepLauncher, Laun

    @Override
    public void onStateTransitionComplete(LauncherState finalState) {
        if (finalState == NORMAL || finalState == SPRING_LOADED) {
            // Clean-up logic that occurs when recents is no longer in use/visible.
            reset();
        }
        setOverlayEnabled(finalState == OVERVIEW || finalState == OVERVIEW_MODAL_TASK);
        setFreezeViewVisibility(false);
    }
+140 −111

File changed.

Preview size limit exceeded, changes collapsed.