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

Commit ccbb3fa4 authored by Jorim Jaggi's avatar Jorim Jaggi Committed by Android (Google) Code Review
Browse files

Merge "Cutout: Fix issues with PopupWindows"

parents 334899b0 a7f9b84b
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -5226,9 +5226,12 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        }

        final int cutoutMode = attrs.layoutInDisplayCutoutMode;
        final boolean attachedInParent = attached != null && !layoutInScreen;
        // Ensure that windows with a DEFAULT or NEVER display cutout mode are laid out in
        // the cutout safe zone.
        if (cutoutMode != LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS) {
        // Windows that are attached to a parent and laid out in said parent are already avoiding
        // the cutout according to that parent and don't need to be further constrained.
        if (cutoutMode != LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS && !attachedInParent) {
            final Rect displayCutoutSafeExceptMaybeTop = mTmpRect;
            displayCutoutSafeExceptMaybeTop.set(displayFrames.mDisplayCutoutSafe);
            if (layoutInScreen && layoutInsetDecor && !requestedFullscreen