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

Commit 83c72ad8 authored by Hongwei Wang's avatar Hongwei Wang Committed by Automerger Merge Worker
Browse files

Merge "Validate target view surface in PipDismissTargetHandler" into tm-dev am: 5cb6c5a9

parents 8f8a1331 5cb6c5a9
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -220,10 +220,16 @@ public class PipDismissTargetHandler implements ViewTreeObserver.OnPreDrawListen
            return;
        }

        final SurfaceControl targetViewLeash =
                mTargetViewContainer.getViewRootImpl().getSurfaceControl();
        if (!targetViewLeash.isValid()) {
            // The surface of mTargetViewContainer is somehow not ready, bail early
            return;
        }

        // Put the dismiss target behind the task
        SurfaceControl.Transaction t = new SurfaceControl.Transaction();
        t.setRelativeLayer(mTargetViewContainer.getViewRootImpl().getSurfaceControl(),
                mTaskLeash, -1);
        t.setRelativeLayer(targetViewLeash, mTaskLeash, -1);
        t.apply();
    }