summaryrefslogtreecommitdiffstats
path: root/quickstep/recents_ui_overrides/src/com/android/quickstep/util/ClipAnimationHelper.java
diff options
context:
space:
mode:
authorJon Miranda <jonmiranda@google.com>2019-05-30 17:35:44 -0700
committerJon Miranda <jonmiranda@google.com>2019-05-30 18:43:22 -0700
commitb3c9077c7676015253ee9334ac08f7c3d87f41b4 (patch)
treef86628b71e0fbb23020cde7679728972d4fc4d50 /quickstep/recents_ui_overrides/src/com/android/quickstep/util/ClipAnimationHelper.java
parentf4fa4be5d6df51d29860c4569fb6eb60df367b79 (diff)
downloadandroid_packages_apps_Trebuchet-b3c9077c7676015253ee9334ac08f7c3d87f41b4.tar.gz
android_packages_apps_Trebuchet-b3c9077c7676015253ee9334ac08f7c3d87f41b4.tar.bz2
android_packages_apps_Trebuchet-b3c9077c7676015253ee9334ac08f7c3d87f41b4.zip
Tuning app open/close animation.
* Mostly value changes. * Added a way to round the corners during swipe up to home animation. Bug: 123900446 Change-Id: Id61d241d919ba51ced0633585e36b7d93efe30b0
Diffstat (limited to 'quickstep/recents_ui_overrides/src/com/android/quickstep/util/ClipAnimationHelper.java')
-rw-r--r--quickstep/recents_ui_overrides/src/com/android/quickstep/util/ClipAnimationHelper.java20
1 files changed, 16 insertions, 4 deletions
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/util/ClipAnimationHelper.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/util/ClipAnimationHelper.java
index e2fb602d9..aca23e4e4 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/util/ClipAnimationHelper.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/util/ClipAnimationHelper.java
@@ -197,10 +197,15 @@ public class ClipAnimationHelper {
mTmpMatrix.postTranslate(app.position.x, app.position.y);
mClipRectF.roundOut(crop);
if (mSupportsRoundedCornersOnWindows) {
- float windowCornerRadius = mUseRoundedCornersOnWindows
- ? mWindowCornerRadius : 0;
- cornerRadius = Utilities.mapRange(progress, windowCornerRadius,
- mTaskCornerRadius);
+ if (params.cornerRadius > -1) {
+ cornerRadius = params.cornerRadius;
+ scale = params.currentRect.width() / crop.width();
+ } else {
+ float windowCornerRadius = mUseRoundedCornersOnWindows
+ ? mWindowCornerRadius : 0;
+ cornerRadius = Utilities.mapRange(progress, windowCornerRadius,
+ mTaskCornerRadius);
+ }
mCurrentCornerRadius = cornerRadius;
}
}
@@ -355,6 +360,7 @@ public class ClipAnimationHelper {
@Nullable RectF currentRect;
float targetAlpha;
boolean forLiveTile;
+ float cornerRadius;
SyncRtSurfaceTransactionApplierCompat syncTransactionApplier;
@@ -365,6 +371,7 @@ public class ClipAnimationHelper {
currentRect = null;
targetAlpha = 0;
forLiveTile = false;
+ cornerRadius = -1;
}
public TransformParams setProgress(float progress) {
@@ -373,6 +380,11 @@ public class ClipAnimationHelper {
return this;
}
+ public TransformParams setCornerRadius(float cornerRadius) {
+ this.cornerRadius = cornerRadius;
+ return this;
+ }
+
public TransformParams setCurrentRectAndTargetAlpha(RectF currentRect, float targetAlpha) {
this.currentRect = currentRect;
this.targetAlpha = targetAlpha;