summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorCraig Mautner <cmautner@google.com>2013-10-14 12:58:42 -0700
committerCraig Mautner <cmautner@google.com>2013-10-14 13:52:28 -0700
commit5800443e2dbb9b7ea4ba479ae0998ce688d44eb7 (patch)
treeb64449be57879d80d2099145640569da0e1b1e89 /services
parent19e8273b1a58801778f07e4199d7accb0e5f0198 (diff)
downloadframeworks_base-5800443e2dbb9b7ea4ba479ae0998ce688d44eb7.zip
frameworks_base-5800443e2dbb9b7ea4ba479ae0998ce688d44eb7.tar.gz
frameworks_base-5800443e2dbb9b7ea4ba479ae0998ce688d44eb7.tar.bz2
Move the wallpaper beneath the keyguard.
If the keyguard is the wallpaper target the wallpaper cannot sit at the bottom of the stack and must be directly beneath the keyguard. Otherwise keep it at the bottom of the window stack. App animations when the keyguard is showing should not be disabled if the keyguard is also animating. Fixes bug 10858941. Fixes bug 10932680. Change-Id: I8399837f6510ea16003f68b165e67439f3571ef4
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/wm/WindowManagerService.java16
1 files changed, 12 insertions, 4 deletions
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java
index 0908563..00a653b 100644
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -187,7 +187,7 @@ public class WindowManagerService extends IWindowManager.Stub
static final boolean DEBUG_SURFACE_TRACE = false;
static final boolean DEBUG_WINDOW_TRACE = false;
static final boolean DEBUG_TASK_MOVEMENT = false;
- static final boolean DEBUG_STACK = true;
+ static final boolean DEBUG_STACK = false;
static final boolean SHOW_SURFACE_ALLOC = false;
static final boolean SHOW_TRANSACTIONS = false;
static final boolean SHOW_LIGHT_TRANSACTIONS = false || SHOW_TRANSACTIONS;
@@ -1852,13 +1852,21 @@ public class WindowManagerService extends IWindowManager.Stub
}
}
- // Now stick it in.
+ // Now stick it in. For apps over wallpaper keep the wallpaper at the bottommost
+ // layer. For keyguard over wallpaper put the wallpaper under the keyguard.
+ int insertionIndex = 0;
+ if (visible && foundW != null) {
+ final int type = foundW.mAttrs.type;
+ if (type == TYPE_KEYGUARD || type == TYPE_KEYGUARD_SCRIM) {
+ insertionIndex = windows.indexOf(foundW);
+ }
+ }
if (DEBUG_WALLPAPER_LIGHT || DEBUG_WINDOW_MOVEMENT || DEBUG_ADD_REMOVE) {
Slog.v(TAG, "Moving wallpaper " + wallpaper
- + " from " + oldIndex + " to " + 0);
+ + " from " + oldIndex + " to " + insertionIndex);
}
- windows.add(0, wallpaper);
+ windows.add(insertionIndex, wallpaper);
mWindowsChanged = true;
changed |= ADJUST_WALLPAPER_LAYERS_CHANGED;
}