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

Commit 5047e888 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Reparent child surfaces when swapping out new surfaces"

parents b0141a09 7c861474
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -370,6 +370,13 @@ class WindowStateAnimator {
            // of the proper size. The preserved surface will still be removed when client
            // finishes drawing to the new surface.
            mSurfaceDestroyDeferred = false;

            // Make sure to reparent any children of the new surface back to the preserved
            // surface before destroying it.
            if (mSurfaceController != null && mPendingDestroySurface != null) {
                mPostDrawTransaction.reparentChildren(mSurfaceController.mSurfaceControl,
                        mPendingDestroySurface.mSurfaceControl).apply();
            }
            destroySurfaceLocked();
            mSurfaceDestroyDeferred = true;
            return;