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

Commit 54b3167f authored by Jerry Chang's avatar Jerry Chang Committed by Automerger Merge Worker
Browse files

Merge "Fix timeout when dismissing split screen to two pane mode" into...

Merge "Fix timeout when dismissing split screen to two pane mode" into tm-qpr-dev am: b48c123b am: 0f306974

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19947800



Change-Id: Ia491efa508e29fa20f52ea3d88f744f1130ad02f
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 9a78c6c2 0f306974
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -45,11 +45,6 @@ class MainStage extends StageTaskListener {
                iconProvider);
    }

    @Override
    void dismiss(WindowContainerTransaction wct, boolean toTop) {
        deactivate(wct, toTop);
    }

    boolean isActive() {
        return mIsActive;
    }
+0 −5
Original line number Diff line number Diff line
@@ -42,11 +42,6 @@ class SideStage extends StageTaskListener {
                iconProvider);
    }

    @Override
    void dismiss(WindowContainerTransaction wct, boolean toTop) {
        removeAllTasks(wct, toTop);
    }

    boolean removeAllTasks(WindowContainerTransaction wct, boolean toTop) {
        if (mChildrenTaskInfo.size() == 0) return false;
        wct.reparentTasks(
+5 −7
Original line number Diff line number Diff line
@@ -934,13 +934,10 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
            // Expand to top side split as full screen for fading out decor animation and dismiss
            // another side split(Moving its children to bottom).
            mIsExiting = true;
            final StageTaskListener tempFullStage = childrenToTop;
            final StageTaskListener dismissStage = mMainStage == childrenToTop
                    ? mSideStage : mMainStage;
            tempFullStage.resetBounds(wct);
            wct.setSmallestScreenWidthDp(tempFullStage.mRootTaskInfo.token,
            childrenToTop.resetBounds(wct);
            wct.reorder(childrenToTop.mRootTaskInfo.token, true);
            wct.setSmallestScreenWidthDp(childrenToTop.mRootTaskInfo.token,
                    SMALLEST_SCREEN_WIDTH_DP_UNDEFINED);
            dismissStage.dismiss(wct, false /* toTop */);
        }
        mSyncQueue.queue(wct);
        mSyncQueue.runInSync(t -> {
@@ -957,7 +954,8 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
                childrenToTop.fadeOutDecor(() -> {
                    WindowContainerTransaction finishedWCT = new WindowContainerTransaction();
                    mIsExiting = false;
                    childrenToTop.dismiss(finishedWCT, true /* toTop */);
                    mMainStage.deactivate(finishedWCT, childrenToTop == mMainStage /* toTop */);
                    mSideStage.removeAllTasks(finishedWCT, childrenToTop == mSideStage /* toTop */);
                    finishedWCT.reorder(mRootTaskInfo.token, false /* toTop */);
                    finishedWCT.setForceTranslucent(mRootTaskInfo.token, true);
                    finishedWCT.setBounds(mSideStage.mRootTaskInfo.token, mTempRect1);
+0 −5
Original line number Diff line number Diff line
@@ -106,11 +106,6 @@ class StageTaskListener implements ShellTaskOrganizer.TaskListener {
        taskOrganizer.createRootTask(displayId, WINDOWING_MODE_MULTI_WINDOW, this);
    }

    /**
     * General function for dismiss this stage.
     */
    void dismiss(WindowContainerTransaction wct, boolean toTop) {}

    int getChildCount() {
        return mChildrenTaskInfo.size();
    }
+0 −2
Original line number Diff line number Diff line
@@ -225,7 +225,6 @@ public class StageCoordinatorTests extends ShellTestCase {
        mStageCoordinator.exitSplitScreen(testTaskId, EXIT_REASON_RETURN_HOME);
        verify(mMainStage).reorderChild(eq(testTaskId), eq(true),
                any(WindowContainerTransaction.class));
        verify(mSideStage).dismiss(any(WindowContainerTransaction.class), eq(false));
        verify(mMainStage).resetBounds(any(WindowContainerTransaction.class));
    }

@@ -239,7 +238,6 @@ public class StageCoordinatorTests extends ShellTestCase {
        verify(mSideStage).reorderChild(eq(testTaskId), eq(true),
                any(WindowContainerTransaction.class));
        verify(mSideStage).resetBounds(any(WindowContainerTransaction.class));
        verify(mMainStage).dismiss(any(WindowContainerTransaction.class), eq(false));
    }

    @Test