Set the offset of the dim layer of DisplayArea.

Bug: 217637411
Test: Check if the dim layer of DisplayArea is positioned correctly.
Change-Id: I8fd3494a3cd7ad6183ce6aa442e49f85b441c73f
This commit is contained in:
Yuncheol Heo
2022-02-15 17:33:44 -08:00
parent af9e9264f9
commit f80d567a7e

View File

@@ -652,7 +652,9 @@ public class DisplayArea<T extends WindowContainer> extends WindowContainer<T> {
void prepareSurfaces() {
mDimmer.resetDimStates();
super.prepareSurfaces();
// Bounds need to be relative, as the dim layer is a child.
getBounds(mTmpDimBoundsRect);
mTmpDimBoundsRect.offsetTo(0 /* newLeft */, 0 /* newTop */);
// If SystemUI is dragging for recents, we want to reset the dim state so any dim layer
// on the display level fades out.