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

Commit e4500fc4 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Remove overlay when DC is mirroring" into sc-v2-dev am: c936811c am: 7591c10b

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16215199

Change-Id: Ic4c7e49d9a7ade723bd2b31f007508ab2d998bf9
parents b06e9190 7591c10b
Loading
Loading
Loading
Loading
+5 −2
Original line number Original line Diff line number Diff line
@@ -5981,7 +5981,8 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
                // Reparent the SurfaceControl of this DisplayContent to null, to prevent content
                // Reparent the SurfaceControl of this DisplayContent to null, to prevent content
                // being added to it. This ensures that no app launched explicitly on the
                // being added to it. This ensures that no app launched explicitly on the
                // VirtualDisplay will show up as part of the mirrored content.
                // VirtualDisplay will show up as part of the mirrored content.
                .reparent(mWindowingLayer, null);
                .reparent(mWindowingLayer, null)
                .reparent(mOverlayLayer, null);
        // Retrieve the size of the DisplayArea to mirror.
        // Retrieve the size of the DisplayArea to mirror.
        updateMirroredSurface(transaction, wc.getDisplayContent().getBounds(), surfaceSize);
        updateMirroredSurface(transaction, wc.getDisplayContent().getBounds(), surfaceSize);
        mTokenToMirror = tokenToMirror;
        mTokenToMirror = tokenToMirror;
@@ -6011,7 +6012,9 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
                    // Reparent the SurfaceControl of this DisplayContent back to mSurfaceControl,
                    // Reparent the SurfaceControl of this DisplayContent back to mSurfaceControl,
                    // to allow content to be added to it. This allows this DisplayContent to stop
                    // to allow content to be added to it. This allows this DisplayContent to stop
                    // mirroring and show content normally.
                    // mirroring and show content normally.
                    .reparent(mWindowingLayer, mSurfaceControl).apply();
                    .reparent(mWindowingLayer, mSurfaceControl)
                    .reparent(mOverlayLayer, mSurfaceControl)
                    .apply();
            // Stop mirroring by destroying the reference to the mirrored layer.
            // Stop mirroring by destroying the reference to the mirrored layer.
            mMirroredSurface = null;
            mMirroredSurface = null;
            // Do not un-set the token, in case content is removed and mirroring should begin again.
            // Do not un-set the token, in case content is removed and mirroring should begin again.