Skip to content

Commit 73dc259

Browse files
Pal SzaszJohan Redestig
authored andcommitted
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
1 parent 75a2ae9 commit 73dc259

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

services/java/com/android/server/WindowManagerService.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1501,6 +1501,7 @@ int adjustWallpaperWindowsLocked() {
15011501
WindowState wb = (WindowState)localmWindows.get(foundI-1);
15021502
if (wb.mBaseLayer < maxLayer &&
15031503
wb.mAttachedWindow != foundW &&
1504+
wb.mAttachedWindow != foundW.mAttachedWindow &&
15041505
(wb.mAttrs.type != TYPE_APPLICATION_STARTING ||
15051506
wb.mToken != foundW.mToken)) {
15061507
// This window is not related to the previous one in any

0 commit comments

Comments
 (0)