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

Commit 1287d936 authored by Ben Lin's avatar Ben Lin
Browse files

Set divider visibility to false when #prepareExitSplitScreen.

When we are using #prepareExitSplitScreen, it is because we need the wct to be supplied with exit-split changes, yet StageCoordinator will not be the one driving the transition - someone else is (e.g. desktop). If that's the case, we don't have any way for the divider to be set not visible as part of the transition animation; since we are already pretty sure we are exiting Splitscreen (already removing tasks on MainStage and SideStage), just set divider visibility to false early.

Bug: 413131732
Test: Manual. Open splitscreen, use app handle to put one app into desktop - no more divider view visible.
Flag: EXEMPT bugfix
Change-Id: I23565637dc387389c9305a7072eedfc94e55e42f
parent 72c7db4c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -470,6 +470,7 @@ public class SplitScreenController implements SplitDragPolicy.Starter,
    public void prepareExitSplitScreen(WindowContainerTransaction wct,
            @StageType int stageToTop, @ExitReason int reason) {
        mStageCoordinator.prepareExitSplitScreen(stageToTop, wct, reason);
        mStageCoordinator.setDividerVisibility(false, null);
        mStageCoordinator.clearSplitPairedInRecents(reason);
    }

+5 −3
Original line number Diff line number Diff line
@@ -2413,9 +2413,11 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
        setDividerVisibility(mainStageVisible, null);
    }

    // Set divider visibility flag and try to apply it, the param transaction is used to apply.
    // See applyDividerVisibility for more detail.
    private void setDividerVisibility(boolean visible, @Nullable SurfaceControl.Transaction t) {
    /**
     * Set divider visibility flag and try to apply it, the param transaction is used to apply.
     * See applyDividerVisibility for more detail.
     */
    public void setDividerVisibility(boolean visible, @Nullable SurfaceControl.Transaction t) {
        if (visible == mDividerVisible) {
            return;
        }