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
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user