summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Miranda <jonmiranda@google.com>2020-03-10 00:49:13 (GMT)
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-03-10 00:49:13 (GMT)
commit4461347e0e2c36bdb48cdfa91147600e26b5301f (patch)
tree25645852f04e33a8d2b940fc9bd07d823610d997
parenta299714c7a080b87fab4bb0f1a9c15231558b8c4 (diff)
parent96c2220f7fbc349562b3385d74456470c6354354 (diff)
downloadandroid_packages_apps_Trebuchet-4461347e0e2c36bdb48cdfa91147600e26b5301f.zip
android_packages_apps_Trebuchet-4461347e0e2c36bdb48cdfa91147600e26b5301f.tar.gz
android_packages_apps_Trebuchet-4461347e0e2c36bdb48cdfa91147600e26b5301f.tar.bz2
Merge "[DO NOT MERGE] Fix some visual jumps when swiping home" into qt-qpr1-dev
-rw-r--r--quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandler.java7
-rw-r--r--quickstep/recents_ui_overrides/src/com/android/quickstep/util/ClipAnimationHelper.java4
2 files changed, 10 insertions, 1 deletions
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandler.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandler.java
index 5cce53e..e5d2b41 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandler.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandler.java
@@ -386,6 +386,10 @@ public abstract class BaseSwipeUpHandler<T extends BaseDraggingActivity, Q exten
// rounding at the end of the animation.
float startRadius = mClipAnimationHelper.getCurrentCornerRadius();
float endRadius = startRect.width() / 6f;
+
+ float startTransformProgress = mTransformParams.getProgress();
+ float endTransformProgress = 1;
+
// We want the window alpha to be 0 once this threshold is met, so that the
// FolderIconView can be seen morphing into the icon shape.
final float windowAlphaThreshold = isFloatingIconView ? 1f - SHAPE_PROGRESS_DURATION : 1f;
@@ -409,7 +413,8 @@ public abstract class BaseSwipeUpHandler<T extends BaseDraggingActivity, Q exten
public void onUpdate(RectF currentRect, float progress) {
homeAnim.setPlayFraction(progress);
- mTransformParams.setProgress(progress)
+ mTransformParams.setProgress(
+ Utilities.mapRange(progress, startTransformProgress, endTransformProgress))
.setCurrentRectAndTargetAlpha(currentRect, getWindowAlpha(progress));
if (isFloatingIconView) {
mTransformParams.setCornerRadius(endRadius * progress + startRadius
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 a12ae7a..68007da 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
@@ -402,6 +402,10 @@ public class ClipAnimationHelper {
return this;
}
+ public float getProgress() {
+ return progress;
+ }
+
public TransformParams setCornerRadius(float cornerRadius) {
this.cornerRadius = cornerRadius;
return this;