OSDN Git Service

Make SurfaceView layers captured by screenshotApplications()
authorSangkyu Lee <sk82.lee@lge.com>
Thu, 21 Nov 2013 06:20:33 +0000 (15:20 +0900)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 27 Aug 2014 10:19:18 +0000 (18:19 +0800)
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 <sk82.lee@lge.com>
services/java/com/android/server/wm/WindowManagerService.java

index f6927aa..59e8e2c 100644 (file)
@@ -5613,8 +5613,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) {
@@ -5640,11 +5639,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) {