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

Commit 52762366 authored by Winson Chung's avatar Winson Chung Committed by Jeremy Sim
Browse files

Remove existing divider immediately when entering split

Changes the update() call in finishEnterSplitScreen() so that the divider is cleared immediately, rather than waiting for the transaction to be applied.

Fixes: 343487187
Test: Visually confirmed
Flag: None
Change-Id: I410b24831942907b845807a1998e0d0df5ee62c4
parent 5eed64b9
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -143,6 +143,8 @@ public final class SplitWindowManager extends WindowlessWindowManager {
    /**
     * Releases the surface control of the current {@link DividerView} and tear down the view
     * hierarchy.
     * @param t If supplied, the surface removal will be bundled with this Transaction. If
     *          called with null, removes the surface immediately.
     */
    void release(@Nullable SurfaceControl.Transaction t) {
        if (mDividerView != null) {
+1 −1
Original line number Diff line number Diff line
@@ -1846,7 +1846,7 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,

    void finishEnterSplitScreen(SurfaceControl.Transaction finishT) {
        ProtoLog.d(WM_SHELL_SPLIT_SCREEN, "finishEnterSplitScreen");
        mSplitLayout.update(finishT, true /* resetImePosition */);
        mSplitLayout.update(null, true /* resetImePosition */);
        mMainStage.getSplitDecorManager().inflate(mContext, mMainStage.mRootLeash);
        mSideStage.getSplitDecorManager().inflate(mContext, mSideStage.mRootLeash);
        setDividerVisibility(true, finishT);