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

Commit 3c6197c7 authored by Winson Chung's avatar Winson Chung Committed by Android (Google) Code Review
Browse files

Merge "Fallback to default aspect ratio if not provided" into 24D1-dev

parents 45b19f36 62fa1350
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -979,7 +979,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