Merge "Fix bug where shape reveal progress gets started too early." into ub-launcher3-qt-dev

This commit is contained in:
TreeHugger Robot
2019-05-29 21:57:41 +00:00
committed by Android (Google) Code Review
2 changed files with 3 additions and 5 deletions
@@ -1135,12 +1135,10 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity>
// FolderIconView can be seen morphing into the icon shape.
final float windowAlphaThreshold = isFloatingIconView ? 1f - SHAPE_PROGRESS_DURATION : 1f;
anim.addOnUpdateListener((currentRect, progress) -> {
float interpolatedProgress = Interpolators.ACCEL_1_5.getInterpolation(progress);
homeAnim.setPlayFraction(progress);
float windowAlpha = Utilities.mapToRange(interpolatedProgress, 0,
windowAlphaThreshold, 1f, 0f, Interpolators.LINEAR);
float windowAlpha = Math.max(0, Utilities.mapToRange(progress, 0,
windowAlphaThreshold, 1f, 0f, Interpolators.LINEAR));
mTransformParams.setProgress(progress)
.setCurrentRectAndTargetAlpha(currentRect, windowAlpha);
mClipAnimationHelper.applyTransform(targetSet, mTransformParams,
@@ -229,7 +229,7 @@ public class FloatingIconView extends View implements
mTaskCornerRadius = cornerRadius / scale;
if (mIsAdaptiveIcon) {
if (!isOpening && shapeRevealProgress >= 0) {
if (!isOpening && progress >= shapeProgressStart) {
if (mRevealAnimator == null) {
mRevealAnimator = (ValueAnimator) IconShape.getShape().createRevealAnimator(
this, mStartRevealRect, mOutline, mTaskCornerRadius, !isOpening);