diff options
| author | 2017-01-20 18:13:01 +0100 | |
|---|---|---|
| committer | 2017-01-23 14:17:44 +0100 | |
| commit | bfbd9dc9635fb7518fd34590621f253c2da0eb3a (patch) | |
| tree | 70896f905f509705fcf7006ab1e8b15620bb8484 | |
| parent | 7361babf94baa985eaa8bd2e94fcb16f00670998 (diff) | |
Fix screenshotting with includeDecor=true in multi-window
The old code wasn't really tested and stackBounds variable was
null in any case.
Test: Go to multi-window, go to recents, make sure screenshot is
correct.
Bug: 31339431
Change-Id: I721397800ba7519dba7f569461c5f339eba0591b
| -rw-r--r-- | services/core/java/com/android/server/wm/DisplayContent.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java index 592eaec7f31d..3e703b2fb3b0 100644 --- a/services/core/java/com/android/server/wm/DisplayContent.java +++ b/services/core/java/com/android/server/wm/DisplayContent.java @@ -2252,10 +2252,11 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo } // Don't include wallpaper in bounds calculation - if (includeDecor && !stackBounds.isEmpty()) { - frame.set(stackBounds); - } else if (includeDecor) { - mutableIncludeFullDisplay.value = true; + if (!mutableIncludeFullDisplay.value && includeDecor) { + final TaskStack stack = w.getStack(); + if (stack != null) { + stack.getBounds(frame); + } } else if (!mutableIncludeFullDisplay.value && !w.mIsWallpaper) { final Rect wf = w.mFrame; final Rect cr = w.mContentInsets; |