Scale corner radius when swiping down on a task
Now the corner radius matches the window when the task fills the screen.
Change-Id: Ic149f39053ac1e4cfa1304d4dfd3ed0688b92410
diff --git a/quickstep/src/com/android/quickstep/util/ClipAnimationHelper.java b/quickstep/src/com/android/quickstep/util/ClipAnimationHelper.java
index 898de97..d8a3282 100644
--- a/quickstep/src/com/android/quickstep/util/ClipAnimationHelper.java
+++ b/quickstep/src/com/android/quickstep/util/ClipAnimationHelper.java
@@ -329,13 +329,14 @@
canvas.concat(mTmpMatrix);
canvas.translate(mTargetRect.left, mTargetRect.top);
+ float scale = mTargetRect.width() / mSourceRect.width();
float insetProgress = (1 - progress);
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() {