From d143613023032183a016b3e624bb51f2e6b6d2b8 Mon Sep 17 00:00:00 2001 From: Lucas Dupin Date: Fri, 7 Dec 2018 11:23:15 -0800 Subject: [PATCH] Rounded corners polish Fixes: - Windows too round during launch animation - Radius not matching window when swiping down Test: visual Bug: 120553563 Change-Id: I20ac56ac21c196c2f599b8b45af1e3c072ee59f0 --- .../src/com/android/quickstep/util/ClipAnimationHelper.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/quickstep/util/ClipAnimationHelper.java b/quickstep/src/com/android/quickstep/util/ClipAnimationHelper.java index 8c9ceadafb..1e1f147c16 100644 --- a/quickstep/src/com/android/quickstep/util/ClipAnimationHelper.java +++ b/quickstep/src/com/android/quickstep/util/ClipAnimationHelper.java @@ -331,12 +331,13 @@ public class ClipAnimationHelper { canvas.translate(mTargetRect.left, mTargetRect.top); float insetProgress = (1 - progress); + float scale = currentRect.width() / mTargetRect.width(); ttv.drawOnCanvas(canvas, -mSourceWindowClipInsets.left * insetProgress, -mSourceWindowClipInsets.top * insetProgress, ttv.getMeasuredWidth() + mSourceWindowClipInsets.right * insetProgress, ttv.getMeasuredHeight() + mSourceWindowClipInsets.bottom * insetProgress, - Utilities.mapRange(progress, mWindowCornerRadius, ttv.getCornerRadius())); + Utilities.mapRange(progress, mWindowCornerRadius / scale, ttv.getCornerRadius())); } public RectF getTargetRect() {