Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 50e70288 authored by Mateusz Cicheński's avatar Mateusz Cicheński Committed by Android (Google) Code Review
Browse files

Merge "Only compare the relevant insets for navbar position" into udc-dev

parents 01b189fb 5bd7cc22
Loading
Loading
Loading
Loading
+3 −4
Original line number Original line Diff line number Diff line
@@ -375,16 +375,15 @@ public class DisplayLayout {
                    insetsState.getDisplayFrame(),
                    insetsState.getDisplayFrame(),
                    WindowInsets.Type.navigationBars(),
                    WindowInsets.Type.navigationBars(),
                    false /* ignoreVisibility */);
                    false /* ignoreVisibility */);
            outInsets.set(insets.left, insets.top, insets.right, insets.bottom);
            int position = navigationBarPosition(res, displayWidth, displayHeight, displayRotation);
            int position = navigationBarPosition(res, displayWidth, displayHeight, displayRotation);
            int navBarSize =
            int navBarSize =
                    getNavigationBarSize(res, position, displayWidth > displayHeight, uiMode);
                    getNavigationBarSize(res, position, displayWidth > displayHeight, uiMode);
            if (position == NAV_BAR_BOTTOM) {
            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) {
            } 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) {
            } else if (position == NAV_BAR_LEFT) {
                outInsets.left = Math.max(outInsets.left , navBarSize);
                outInsets.left = Math.max(insets.left , navBarSize);
            }
            }
        }
        }