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

Commit ec7c0722 authored by Tony Huang's avatar Tony Huang
Browse files

Support exit to full screen to non-split app

When a task no longer supports multi-window, we should dismiss split
to the task so users can continue interacting with the task to prevent
bad UX. We should exit split and extand the side
NoLongerSupportMultiWindow let user could interact continuously.

Fix: 221255438
Test: manual
Test: pass existing tests
Change-Id: Iae61d821028755dcca96edb904912495b268bf8c
parent 00acc09c
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -1827,15 +1827,17 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
        @Override
        public void onNoLongerSupportMultiWindow() {
            if (mMainStage.isActive()) {
                final boolean isMainStage = mMainStageListener == this;
                if (!ENABLE_SHELL_TRANSITIONS) {
                    StageCoordinator.this.exitSplitScreen(null /* childrenToTop */,
                    StageCoordinator.this.exitSplitScreen(isMainStage ? mMainStage : mSideStage,
                            EXIT_REASON_APP_DOES_NOT_SUPPORT_MULTIWINDOW);
                    return;
                }

                final int stageType = isMainStage ? STAGE_TYPE_MAIN : STAGE_TYPE_SIDE;
                final WindowContainerTransaction wct = new WindowContainerTransaction();
                prepareExitSplitScreen(STAGE_TYPE_UNDEFINED, wct);
                mSplitTransitions.startDismissTransition(wct,
                        StageCoordinator.this, STAGE_TYPE_UNDEFINED,
                prepareExitSplitScreen(stageType, wct);
                mSplitTransitions.startDismissTransition(wct,StageCoordinator.this, stageType,
                        EXIT_REASON_APP_DOES_NOT_SUPPORT_MULTIWINDOW);
            }
        }