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

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

Merge "Cap scale when swiping to PiP" into main

parents 763a6e68 d2e8dfa3
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;