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

Commit aeef4ae5 authored by Ikram Gabiyev's avatar Ikram Gabiyev Committed by Android (Google) Code Review
Browse files

Merge "Cap scale when swiping to PiP" into 24D1-dev

parents b92a138e d7f88601
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -99,7 +99,7 @@ public class PipSurfaceTransactionHelper {
            final float startScale = sourceRectHint.width() <= sourceRectHint.height()
                    ? (float) destinationBounds.width() / sourceBounds.width()
                    : (float) destinationBounds.height() / sourceBounds.height();
            scale = (1 - progress) * startScale + progress * endScale;
            scale = Math.min((1 - progress) * startScale + progress * endScale, 1.0f);
        }
        final float left = destinationBounds.left - (insets.left + sourceBounds.left) * scale;
        final float top = destinationBounds.top - (insets.top + sourceBounds.top) * scale;