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

Commit 27475331 authored by Shawn Lin's avatar Shawn Lin Committed by Automerger Merge Worker
Browse files

Merge "Fix CTS failure for waterfall device" am: 816e6b43 am: 734475d8

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1930820

Change-Id: Ia06667eb4af6c7abae558384b647783be25f580d
parents d0a6043e 734475d8
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -2787,7 +2787,15 @@ class Task extends WindowContainer<WindowContainer> {

            if (inOutConfig.smallestScreenWidthDp
                    == Configuration.SMALLEST_SCREEN_WIDTH_DP_UNDEFINED) {
                if (WindowConfiguration.isFloating(windowingMode)) {
                // When entering to or exiting from Pip, the PipTaskOrganizer will set the
                // windowing mode of the activity in the task to WINDOWING_MODE_FULLSCREEN and
                // temporarily set the bounds of the task to fullscreen size for transitioning.
                // It will get the wrong value if the calculation is based on this temporary
                // fullscreen bounds.
                // We should just inherit the value from parent for this temporary state.
                final boolean inPipTransition = windowingMode == WINDOWING_MODE_PINNED
                        && !mTmpFullBounds.isEmpty() && mTmpFullBounds.equals(parentBounds);
                if (WindowConfiguration.isFloating(windowingMode) && !inPipTransition) {
                    // For floating tasks, calculate the smallest width from the bounds of the task
                    inOutConfig.smallestScreenWidthDp = (int) (
                            Math.min(mTmpFullBounds.width(), mTmpFullBounds.height()) / density);