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

Commit 7b7177ef authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Make a copy for local surface in transition info

The transition surface may be released when the transition is finished.

Bug: 429267767
Flag: EXEMPT bugfix
Test: Enter/leave split screen with display change.
Change-Id: I5724be925f19c6172d7291862df6f1afa97f4483
parent aa878a5a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -47,7 +47,9 @@ class SplitTransitionModifier {
            Slog.w(TAG, "addDimLayerToTransition but leash was released or not created")
        } else {
            val change =
                TransitionInfo.Change(null,  /* token */dimLayer)
                TransitionInfo.Change(null /* container */,
                    SurfaceControl(dimLayer, "addDimLayerToTransition")
                )
            change.parent = parentToken
            change.setStartAbsBounds(bounds)
            change.setEndAbsBounds(bounds)
+3 −1
Original line number Diff line number Diff line
@@ -4432,7 +4432,9 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
            return;
        }

        final TransitionInfo.Change barChange = new TransitionInfo.Change(null /* token */, leash);
        final TransitionInfo.Change barChange = new TransitionInfo.Change(null /* token */,
                // Make a copy because the transition leash may be released on finish.
                new SurfaceControl(leash, "addDividerBarToTransition"));
        mSplitLayout.getRefDividerBounds(mTempRect1);
        int displayId = SplitMultiDisplayHelper.getTransitionDisplayId(info);
        barChange.setParent(mSplitMultiDisplayHelper.getDisplayRootTaskInfo(displayId).token);