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

Commit 1d806343 authored by Yunfan Chen's avatar Yunfan Chen Committed by Android (Google) Code Review
Browse files

Merge "No hard-coded insets type in config calculation" into main

parents 6c0f69e8 4a914a40
Loading
Loading
Loading
Loading
+5 −8
Original line number Diff line number Diff line
@@ -1877,15 +1877,12 @@ public class DisplayPolicy {
                final InsetsState insetsState = df.mInsetsState;
                final Rect displayFrame = insetsState.getDisplayFrame();
                final Insets decor = insetsState.calculateInsets(displayFrame,
                        dc.mWmService.mDecorTypes,
                        true /* ignoreVisibility */);
                final Insets statusBar = insetsState.calculateInsets(displayFrame,
                        Type.statusBars(), true /* ignoreVisibility */);
                        dc.mWmService.mDecorTypes, true /* ignoreVisibility */);
                final Insets configInsets = insetsState.calculateInsets(displayFrame,
                        dc.mWmService.mConfigTypes, true /* ignoreVisibility */);
                mNonDecorInsets.set(decor.left, decor.top, decor.right, decor.bottom);
                mConfigInsets.set(Math.max(statusBar.left, decor.left),
                        Math.max(statusBar.top, decor.top),
                        Math.max(statusBar.right, decor.right),
                        Math.max(statusBar.bottom, decor.bottom));
                mConfigInsets.set(configInsets.left, configInsets.top, configInsets.right,
                        configInsets.bottom);
                mNonDecorFrame.set(displayFrame);
                mNonDecorFrame.inset(mNonDecorInsets);
                mConfigFrame.set(displayFrame);
+2 −1
Original line number Diff line number Diff line
@@ -1191,7 +1191,8 @@ public class WindowManagerService extends IWindowManager.Stub
                && mFlags.mAllowsScreenSizeDecoupledFromStatusBarAndCutout;
        if (!isScreenSizeDecoupledFromStatusBarAndCutout) {
            mDecorTypes = WindowInsets.Type.displayCutout() | WindowInsets.Type.navigationBars();
            mConfigTypes = WindowInsets.Type.statusBars() | WindowInsets.Type.navigationBars();
            mConfigTypes = WindowInsets.Type.displayCutout() | WindowInsets.Type.statusBars()
                    | WindowInsets.Type.navigationBars();
        } else {
            mDecorTypes = WindowInsets.Type.navigationBars();
            mConfigTypes = WindowInsets.Type.navigationBars();