Remove keep clear areas when a view detaches

If a View detaches, its keep clear areas should no longer be considered
when placing a PiP.

Bug: 209577354
Test: atest KeepClearRectsTests#testIgnoreKeepClearRectsFromDetachedViews
Change-Id: I0caa74d4bef2ee157fc3f48747788e30752d09ad
This commit is contained in:
Robert Horvath
2022-02-08 16:46:11 +01:00
parent 4d897c6ad0
commit b864abe37b

View File

@@ -21142,6 +21142,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
}
notifyEnterOrExitForAutoFillIfNeeded(false);
if (info != null && !collectPreferKeepClearRects().isEmpty()) {
info.mViewRootImpl.updateKeepClearRectsForView(this);
}
}
/**