summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Filip Gruszczynski <gruszczy@google.com> 2015-11-09 16:13:48 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2015-11-09 16:13:48 +0000
commit86d6f7cd1adaffa0da130a596f91c1b3453e623b (patch)
treeb9fc4639dfc3107b44451a1ee26eefcb1b648671
parent42817202e2dc1b3d2969faab93b01345b3c9f4a2 (diff)
parent5e69fda6d9b1a08e2b0c1716ce65e03b2ea1c2d1 (diff)
Merge "Ignore wallpaper when looking for a position for a free window."
-rw-r--r--services/core/java/com/android/server/wm/WindowManagerService.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index 3205c6cca53f..5e68aa2d4aae 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -1242,7 +1242,16 @@ public class WindowManagerService extends IWindowManager.Stub
final int myLayer = win.mBaseLayer;
int i;
for (i = windows.size() - 1; i >= 0; i--) {
- if (windows.get(i).mBaseLayer <= myLayer) {
+ final WindowState otherWin = windows.get(i);
+ if (otherWin.getBaseType() != TYPE_WALLPAPER && otherWin.mBaseLayer <= myLayer) {
+ // Wallpaper wanders through the window list, for example to position itself
+ // directly behind keyguard. Because of this it will break the ordering based on
+ // WindowState.mBaseLayer. There might windows with higher mBaseLayer behind it and
+ // we don't want the new window to appear above them. An example of this is adding
+ // of the docked stack divider. Consider a scenario with the following ordering (top
+ // to bottom): keyguard, wallpaper, assist preview, apps. We want the dock divider
+ // to land below the assist preview, so the dock divider must ignore the wallpaper,
+ // with which it shares the base layer.
break;
}
}