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

Commit 792be90c authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Decouple the insets from configuration" into 24D1-dev

parents ac5d76fd 80ebad3f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -48,5 +48,7 @@ class WindowManagerFlags {
    final boolean mAllowsScreenSizeDecoupledFromStatusBarAndCutout =
            Flags.allowsScreenSizeDecoupledFromStatusBarAndCutout();

    final boolean mInsetsDecoupledConfiguration = Flags.insetsDecoupledConfiguration();

    /* End Available Flags */
}
+7 −4
Original line number Diff line number Diff line
@@ -1192,13 +1192,16 @@ public class WindowManagerService extends IWindowManager.Stub
        final boolean isScreenSizeDecoupledFromStatusBarAndCutout = context.getResources()
                .getBoolean(R.bool.config_decoupleStatusBarAndDisplayCutoutFromScreenSize)
                && mFlags.mAllowsScreenSizeDecoupledFromStatusBarAndCutout;
        if (!isScreenSizeDecoupledFromStatusBarAndCutout) {
        if (mFlags.mInsetsDecoupledConfiguration) {
            mDecorTypes = 0;
            mConfigTypes = 0;
        } else if (isScreenSizeDecoupledFromStatusBarAndCutout) {
            mDecorTypes = WindowInsets.Type.navigationBars();
            mConfigTypes = WindowInsets.Type.navigationBars();
        } else {
            mDecorTypes = WindowInsets.Type.displayCutout() | WindowInsets.Type.navigationBars();
            mConfigTypes = WindowInsets.Type.displayCutout() | WindowInsets.Type.statusBars()
                    | WindowInsets.Type.navigationBars();
        } else {
            mDecorTypes = WindowInsets.Type.navigationBars();
            mConfigTypes = WindowInsets.Type.navigationBars();
        }
        if (isScreenSizeDecoupledFromStatusBarAndCutout) {
            // Do not fallback to legacy value for enabled devices.