summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Pal Szasz <pal.szasz@sonyericsson.com> 2010-09-03 11:46:26 +0200
committer Johan Redestig <johan.redestig@sonyericsson.com> 2010-09-03 11:46:26 +0200
commit73dc2592bed890c3ea3be5e472bcda977eaf6b1c (patch)
tree274c92cbd33948b04fe842d2854bb44b14c6d282
parent75a2ae937f5354a3432d0a2382e98177bd9b80d5 (diff)
Allow two SurfaceViews inbetween the app and the wallpaper.
When two SurfaceViews are used by an application, which is transparent and uses the wallpaper, only one of the SurfaceViews will be visible. The problem is that when trying to find the correct location for the wallpaper, the window manager locates the activity window and skips every window below it which is related. For the first SurfaceView this will be ok, since the SurfaceViews's attached window is the previous window. However for the second SurfaceView this condition will fail (the 2nd SurfaceViews attached window is not the previous window (which is the 1st SurfaceView)). The fix adds an extra check which detects this usecase (the windows are related if the attached window is the same as the attached window of the previous window). Change-Id: I368e9dd53455dc310f48d6d8c0be68350ff2b79e
-rw-r--r--services/java/com/android/server/WindowManagerService.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java
index 68787cd07ab4..11b6310f1c29 100644
--- a/services/java/com/android/server/WindowManagerService.java
+++ b/services/java/com/android/server/WindowManagerService.java
@@ -1501,6 +1501,7 @@ public class WindowManagerService extends IWindowManager.Stub
WindowState wb = (WindowState)localmWindows.get(foundI-1);
if (wb.mBaseLayer < maxLayer &&
wb.mAttachedWindow != foundW &&
+ wb.mAttachedWindow != foundW.mAttachedWindow &&
(wb.mAttrs.type != TYPE_APPLICATION_STARTING ||
wb.mToken != foundW.mToken)) {
// This window is not related to the previous one in any