From 7ccba974175149b2afa1665fbdbd8c4b7c5ccb3c Mon Sep 17 00:00:00 2001 From: Sangkyu Lee Date: Thu, 21 Nov 2013 15:20:33 +0900 Subject: [PATCH] Make SurfaceView layers captured by screenshotApplications() Since SurfaceView layers are located below application layers, SurfaceView is not captured by screenshotApplications() when the application is running in fullscreen. Moreover, ws.isFullscreen(dw, dh) returns mostly true on the devices which do not use the navigation bar. Change-Id: Ia1036c79054950384a97504714929fd85c8147de Signed-off-by: Sangkyu Lee --- .../java/com/android/server/wm/WindowManagerService.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java index 9a8e6784dac94..7f571ef9b42d3 100644 --- a/services/java/com/android/server/wm/WindowManagerService.java +++ b/services/java/com/android/server/wm/WindowManagerService.java @@ -5371,8 +5371,7 @@ public class WindowManagerService extends IWindowManager.Stub // We keep on including windows until we go past a full-screen // window. - boolean fullscreen = ws.isFullscreen(dw, dh); - including = !ws.mIsImWindow && !fullscreen; + including = !ws.mIsImWindow && !ws.isFullscreen(dw, dh); final WindowStateAnimator winAnim = ws.mWinAnimator; if (maxLayer < winAnim.mSurfaceLayer) { @@ -5397,11 +5396,6 @@ public class WindowManagerService extends IWindowManager.Stub ws.isDisplayedLw()) { screenshotReady = true; } - - if (fullscreen) { - // No point in continuing down through windows. - break; - } } if (appToken != null && appWin == null) {