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

Commit 7503ec73 authored by Jorim Jaggi's avatar Jorim Jaggi Committed by android-build-merger
Browse files

Merge "Fix stuck windows in multi-window" into nyc-dev am: 4a965384

am: 7be78a1e

* commit '7be78a1e':
  Fix stuck windows in multi-window

Change-Id: Id081bfa27b4fa9053839c823e1e7f4c4551c00cc
parents 38765c3a 7be78a1e
Loading
Loading
Loading
Loading
+8 −10
Original line number Diff line number Diff line
@@ -2067,16 +2067,14 @@ final class WindowState implements WindowManagerPolicy.WindowState {
        }
        if (win.mAttrs.type < WindowManager.LayoutParams.FIRST_SYSTEM_WINDOW
                && win.mAppToken != null && win.mAppToken.showForAllUsers) {
            // Save some cycles by not calling getDisplayInfo unless it is an application
            // window intended for all users.
            final DisplayContent displayContent = win.getDisplayContent();
            if (displayContent == null) {
                return true;
            }
            final DisplayInfo displayInfo = displayContent.getDisplayInfo();
            if (win.mFrame.left <= 0 && win.mFrame.top <= 0
                    && win.mFrame.right >= displayInfo.appWidth
                    && win.mFrame.bottom >= displayInfo.appHeight) {

            // All window frames that are fullscreen extend above status bar, but some don't extend
            // below navigation bar. Thus, check for display frame for top/left and stable frame for
            // bottom right.
            if (win.mFrame.left <= win.mDisplayFrame.left
                    && win.mFrame.top <= win.mDisplayFrame.top
                    && win.mFrame.right >= win.mStableFrame.right
                    && win.mFrame.bottom >= win.mStableFrame.bottom) {
                // Is a fullscreen window, like the clock alarm. Show to everyone.
                return false;
            }