Merge "[MediaProjection] Immediately clean up mirrored surface." into sc-v2-dev am: 65b9e72361
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15663084 Change-Id: I1ff382bed385cf9b1b6b4c7c58ae40a13498c161
This commit is contained in:
@@ -5786,6 +5786,13 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
|
|||||||
}
|
}
|
||||||
mRemoved = true;
|
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
|
// Only update focus/visibility for the last one because there may be many root tasks are
|
||||||
// reparented and the intermediate states are unnecessary.
|
// reparented and the intermediate states are unnecessary.
|
||||||
if (lastReparentedRootTask != null) {
|
if (lastReparentedRootTask != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user