Merge "Bring fullscreen backdrop frame back" into tm-dev

This commit is contained in:
Tiger Huang
2022-03-30 14:26:03 +00:00
committed by Android (Google) Code Review

View File

@@ -8093,14 +8093,17 @@ public final class ViewRootImpl implements ViewParent,
private void setFrame(Rect frame) { private void setFrame(Rect frame) {
mWinFrame.set(frame); mWinFrame.set(frame);
final WindowConfiguration winConfig = getConfiguration().windowConfiguration;
mPendingBackDropFrame.set(mPendingDragResizing && !winConfig.useWindowFrameForBackdrop()
? winConfig.getMaxBounds()
: frame);
// Surface position is now inherited from parent, and BackdropFrameRenderer uses backdrop // Surface position is now inherited from parent, and BackdropFrameRenderer uses backdrop
// frame to position content. Thus, we just keep the size of backdrop frame, and remove the // frame to position content. Thus, we just keep the size of backdrop frame, and remove the
// offset to avoid double offset from display origin. // offset to avoid double offset from display origin.
mPendingBackDropFrame.set(frame);
mPendingBackDropFrame.offsetTo(0, 0); mPendingBackDropFrame.offsetTo(0, 0);
mInsetsController.onFrameChanged(mOverrideInsetsFrame != null ? mInsetsController.onFrameChanged(mOverrideInsetsFrame != null ?
mOverrideInsetsFrame : frame); mOverrideInsetsFrame : frame);
} }
/** /**