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

Commit 429f55ec authored by Winson Chung's avatar Winson Chung
Browse files

Fix issue with invalid aspect ratio causing issues resizing

- If the app doesn't have an aspect ratio, we should use the default
  aspect ratio otherwise we'll use 0 which generates a bunch of wrong
  bounds

Change-Id: I2eb4114474cc1ab948a9142d67cbe04ad00d32aa
Bug: 159908926
Test: Enter pip from movies as the movie is loading (the aspect ratio
      is not set up to that point)
parent a750903b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -819,7 +819,7 @@ public class PipTaskOrganizer extends TaskOrganizer implements
    }

    private float getAspectRatioOrDefault(@Nullable PictureInPictureParams params) {
        return params == null
        return params == null || !params.hasSetAspectRatio()
                ? mPipBoundsHandler.getDefaultAspectRatio()
                : params.getAspectRatio();
    }