Use Surface layer for Surface operation.
Previous fix exposed an existing bug where we were using mAnimLayer to
determine the highest Surface layer. This fix uses mSurfaceLayer to set
the layer limits for making the screenshot.
Fixes bug 6586168.
Change-Id: Iaa3b43867aef795ca617ff4b8076428dfc91eaf2
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java
index 10919f2..efbf0d4 100755
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -5437,8 +5437,8 @@
// window.
including = !ws.mIsImWindow && !ws.isFullscreen(dw, dh);
- if (maxLayer < ws.mWinAnimator.mAnimLayer) {
- maxLayer = ws.mWinAnimator.mAnimLayer;
+ if (maxLayer < ws.mWinAnimator.mSurfaceLayer) {
+ maxLayer = ws.mWinAnimator.mSurfaceLayer;
}
// Don't include wallpaper in bounds calculation