Only compare the relevant insets for navbar position
This reverts a regression introduced in http://ag/21397084, where the insets were all rewritten to outInsets, even though the insetsState for them when rotating screen is still in previous orientation. Bug: 281769053 Bug: 234093736 Test: http://recall/-/ekEuGtt9d9HWqkUtAzpHx8/eNX1aOBLtPs7PUR5LUuYfi Change-Id: I508123660c33e63696af39c2735a1dc92fdaf74f
This commit is contained in:
@@ -375,16 +375,15 @@ public class DisplayLayout {
|
||||
insetsState.getDisplayFrame(),
|
||||
WindowInsets.Type.navigationBars(),
|
||||
false /* ignoreVisibility */);
|
||||
outInsets.set(insets.left, insets.top, insets.right, insets.bottom);
|
||||
int position = navigationBarPosition(res, displayWidth, displayHeight, displayRotation);
|
||||
int navBarSize =
|
||||
getNavigationBarSize(res, position, displayWidth > displayHeight, uiMode);
|
||||
if (position == NAV_BAR_BOTTOM) {
|
||||
outInsets.bottom = Math.max(outInsets.bottom , navBarSize);
|
||||
outInsets.bottom = Math.max(insets.bottom , navBarSize);
|
||||
} else if (position == NAV_BAR_RIGHT) {
|
||||
outInsets.right = Math.max(outInsets.right , navBarSize);
|
||||
outInsets.right = Math.max(insets.right , navBarSize);
|
||||
} else if (position == NAV_BAR_LEFT) {
|
||||
outInsets.left = Math.max(outInsets.left , navBarSize);
|
||||
outInsets.left = Math.max(insets.left , navBarSize);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user