Merge "Fix Display SurfaceControl leak"
This commit is contained in:
committed by
Android (Google) Code Review
commit
0eb37fa46f
@@ -2717,6 +2717,9 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
|
||||
mRemovingDisplay = false;
|
||||
}
|
||||
|
||||
// Apply the pending transaction here since we may not be able to reach the DisplayContent
|
||||
// on the next traversal if it's removed from RootWindowContainer child list.
|
||||
getPendingTransaction().apply();
|
||||
mWmService.mWindowPlacerLocked.requestTraversal();
|
||||
}
|
||||
|
||||
|
||||
@@ -530,13 +530,6 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
|
||||
|
||||
if (mSurfaceControl != null) {
|
||||
getPendingTransaction().remove(mSurfaceControl);
|
||||
|
||||
// Merge to parent transaction to ensure the transactions on this WindowContainer are
|
||||
// applied in native even if WindowContainer is removed.
|
||||
if (mParent != null) {
|
||||
mParent.getPendingTransaction().merge(getPendingTransaction());
|
||||
}
|
||||
|
||||
setSurfaceControl(null);
|
||||
mLastSurfacePosition.set(0, 0);
|
||||
scheduleAnimation();
|
||||
|
||||
Reference in New Issue
Block a user