Merge "Account for cutouts in system insets (as done previously)" into rvc-qpr-dev am: a03cd95a12

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12656267

Change-Id: Id6c6f022bd57ed103c0f37a9d09eec4a29d84352
This commit is contained in:
Winson Chung
2020-09-24 16:49:06 +00:00
committed by Automerger Merge Worker

View File

@@ -1094,13 +1094,15 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind
mLastWindowFlags = attrs.flags;
if (insets != null) {
final Insets systemBarInsets = insets.getInsets(WindowInsets.Type.systemBars());
final Insets stableBarInsets = insets.getInsetsIgnoringVisibility(
WindowInsets.Type.systemBars());
mLastTopInset = systemBarInsets.top;
mLastBottomInset = systemBarInsets.bottom;
mLastRightInset = systemBarInsets.right;
mLastLeftInset = systemBarInsets.left;
final Insets systemInsets = Insets.min(
insets.getInsets(WindowInsets.Type.systemBars()
| WindowInsets.Type.displayCutout()), stableBarInsets);
mLastTopInset = systemInsets.top;
mLastBottomInset = systemInsets.bottom;
mLastRightInset = systemInsets.right;
mLastLeftInset = systemInsets.left;
// Don't animate if the presence of stable insets has changed, because that
// indicates that the window was either just added and received them for the