Merge "Set the offset of the dim layer of DisplayArea." into sc-v2-dev

This commit is contained in:
TreeHugger Robot
2022-03-01 01:00:31 +00:00
committed by Android (Google) Code Review

View File

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