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

Commit 6be66602 authored by Hongwei Wang's avatar Hongwei Wang Committed by Android (Google) Code Review
Browse files

Merge "Fallback to default aspect ratio if not provided" into main

parents b2989453 63c0f02a
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -983,7 +983,13 @@ public class PipController implements PipTransitionController.PipTransitionCallb
        // cache current min/max size
        Point minSize = mPipBoundsState.getMinSize();
        Point maxSize = mPipBoundsState.getMaxSize();
        mPipBoundsState.updateMinMaxSize(pictureInPictureParams.getAspectRatioFloat());
        final float aspectRatioFloat;
        if (pictureInPictureParams.hasSetAspectRatio()) {
            aspectRatioFloat = pictureInPictureParams.getAspectRatioFloat();
        } else {
            aspectRatioFloat = mPipBoundsAlgorithm.getDefaultAspectRatio();
        }
        mPipBoundsState.updateMinMaxSize(aspectRatioFloat);
        final Rect entryBounds = mPipTaskOrganizer.startSwipePipToHome(componentName, activityInfo,
                pictureInPictureParams);
        // restore min/max size, as this is referenced later in OnDisplayChangingListener and needs