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

Commit 65b9e723 authored by Naomi Musgrave's avatar Naomi Musgrave Committed by Android (Google) Code Review
Browse files

Merge "[MediaProjection] Immediately clean up mirrored surface." into sc-v2-dev

parents e842065d 162f78c8
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -5786,6 +5786,13 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
        }
        mRemoved = true;

        if (mMirroredSurface != null) {
            // Do not wait for the mirrored surface to be garbage collected, but clean up
            // immediately.
            mWmService.mTransactionFactory.get().remove(mMirroredSurface).apply();
            mMirroredSurface = null;
        }

        // Only update focus/visibility for the last one because there may be many root tasks are
        // reparented and the intermediate states are unnecessary.
        if (lastReparentedRootTask != null) {