Fixes an issue where the stable insets could become smaller
than the top cutout if the display density was set lower
than the natural density.
Bug:
78110564
Test: Set display size to "small", turn on cutout, verify apps do not have a gap between status bar and content.
Change-Id: I478047ccaade0e4e265cc57d03b072ae578b49d0
// For layout, the status bar is always at the top with our fixed height.
displayFrames.mStable.top = displayFrames.mUnrestricted.top
+ mStatusBarHeightForRotation[displayFrames.mRotation];
+ // Make sure the status bar covers the entire cutout height
+ displayFrames.mStable.top = Math.max(displayFrames.mStable.top,
+ displayFrames.mDisplayCutoutSafe.top);
// Tell the bar controller where the collapsed status bar content is
mTmpRect.set(mStatusBar.getContentFrameLw());