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

Commit bf1ed3df authored by Winson's avatar Winson Committed by Winson Chung
Browse files

Fixing issue with the pinned stack being cropped incorrectly.

- Pinned stacks were being treated as full screen tasks, and bounded 
  (incorrectly) to the display rect leading to negative insets.  In 
  turn, this caused the view root to have negative insets, which caused
  layout to be extended (width - (-inset)) when measured.

Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testPinnedStackOutOfBoundsInsetsNonNegative

Change-Id: I3339d982667c981a3c8ca56fb3542188de1d6714
parent b72fd03d
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -889,8 +889,10 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
            getDisplayContent().getLogicalDisplayRect(mTmpRect);
            // Override right and/or bottom insets in case if the frame doesn't fit the screen in
            // non-fullscreen mode.
            boolean overrideRightInset = !fullscreenTask && mFrame.right > mTmpRect.right;
            boolean overrideBottomInset = !fullscreenTask && mFrame.bottom > mTmpRect.bottom;
            boolean overrideRightInset = !windowsAreFloating && !fullscreenTask &&
                    mFrame.right > mTmpRect.right;
            boolean overrideBottomInset = !windowsAreFloating && !fullscreenTask &&
                    mFrame.bottom > mTmpRect.bottom;
            mContentInsets.set(mContentFrame.left - mFrame.left,
                    mContentFrame.top - mFrame.top,
                    overrideRightInset ? mTmpRect.right - mContentFrame.right