Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment