Merge "Fix stuck windows in multi-window" into nyc-dev

This commit is contained in:
Jorim Jaggi
2016-04-25 19:33:38 +00:00
committed by Android (Google) Code Review

View File

@@ -2067,16 +2067,14 @@ final class WindowState implements WindowManagerPolicy.WindowState {
} }
if (win.mAttrs.type < WindowManager.LayoutParams.FIRST_SYSTEM_WINDOW if (win.mAttrs.type < WindowManager.LayoutParams.FIRST_SYSTEM_WINDOW
&& win.mAppToken != null && win.mAppToken.showForAllUsers) { && win.mAppToken != null && win.mAppToken.showForAllUsers) {
// Save some cycles by not calling getDisplayInfo unless it is an application
// window intended for all users. // All window frames that are fullscreen extend above status bar, but some don't extend
final DisplayContent displayContent = win.getDisplayContent(); // below navigation bar. Thus, check for display frame for top/left and stable frame for
if (displayContent == null) { // bottom right.
return true; if (win.mFrame.left <= win.mDisplayFrame.left
} && win.mFrame.top <= win.mDisplayFrame.top
final DisplayInfo displayInfo = displayContent.getDisplayInfo(); && win.mFrame.right >= win.mStableFrame.right
if (win.mFrame.left <= 0 && win.mFrame.top <= 0 && win.mFrame.bottom >= win.mStableFrame.bottom) {
&& win.mFrame.right >= displayInfo.appWidth
&& win.mFrame.bottom >= displayInfo.appHeight) {
// Is a fullscreen window, like the clock alarm. Show to everyone. // Is a fullscreen window, like the clock alarm. Show to everyone.
return false; return false;
} }