Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d1422b56 authored by Jorim Jaggi's avatar Jorim Jaggi Committed by Android (Google) Code Review
Browse files

Merge "Fix bounds calculation" into oc-dev

parents d14e6765 70f59488
Loading
Loading
Loading
Loading
+22 −20
Original line number Original line Diff line number Diff line
@@ -2948,7 +2948,8 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
                }
                }


                // Don't include wallpaper in bounds calculation
                // Don't include wallpaper in bounds calculation
                if (!mutableIncludeFullDisplay.value && includeDecor) {
                if (!w.mIsWallpaper && !mutableIncludeFullDisplay.value) {
                    if (includeDecor) {
                        final TaskStack stack = w.getStack();
                        final TaskStack stack = w.getStack();
                        if (stack != null) {
                        if (stack != null) {
                            stack.getBounds(frame);
                            stack.getBounds(frame);
@@ -2957,7 +2958,7 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
                        // We want to screenshot with the exact bounds of the surface of the app. Thus,
                        // We want to screenshot with the exact bounds of the surface of the app. Thus,
                        // intersect it with the frame.
                        // intersect it with the frame.
                        frame.intersect(w.mFrame);
                        frame.intersect(w.mFrame);
                }else if (!mutableIncludeFullDisplay.value && !w.mIsWallpaper) {
                    } else {
                        final Rect wf = w.mFrame;
                        final Rect wf = w.mFrame;
                        final Rect cr = w.mContentInsets;
                        final Rect cr = w.mContentInsets;
                        int left = wf.left + cr.left;
                        int left = wf.left + cr.left;
@@ -2971,6 +2972,7 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
                            frame.setEmpty();
                            frame.setEmpty();
                        }
                        }
                    }
                    }
                }


                final boolean foundTargetWs =
                final boolean foundTargetWs =
                        (w.mAppToken != null && w.mAppToken.token == appToken)
                        (w.mAppToken != null && w.mAppToken.token == appToken)