diff options
Diffstat (limited to 'services/core/java/com/android/server/wm/WindowManagerService.java')
-rw-r--r-- | services/core/java/com/android/server/wm/WindowManagerService.java | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java index 5d8979f..6bc089d 100644 --- a/services/core/java/com/android/server/wm/WindowManagerService.java +++ b/services/core/java/com/android/server/wm/WindowManagerService.java @@ -6221,7 +6221,10 @@ public class WindowManagerService extends IWindowManager.Stub int bottom = wf.bottom - cr.bottom; frame.union(left, top, right, bottom); ws.getStackBounds(stackBounds); - frame.intersect(stackBounds); + if (!frame.intersect(stackBounds)) { + // Set frame empty if there's no intersection. + frame.setEmpty(); + } } if (ws.mAppToken != null && ws.mAppToken.token == appToken && @@ -6268,12 +6271,16 @@ public class WindowManagerService extends IWindowManager.Stub if (!includeFullDisplay) { // Constrain frame to the screen size. - frame.intersect(0, 0, dw, dh); + if (!frame.intersect(0, 0, dw, dh)) { + frame.setEmpty(); + } } else { // Caller just wants entire display. frame.set(0, 0, dw, dh); } - + if (frame.isEmpty()) { + return null; + } if (width < 0) { width = frame.width(); |