Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 928fc8d1 authored by Jon Miranda's avatar Jon Miranda
Browse files

Fix bug where shape reveal progress gets started too early.

* This caused the shape to not match the window size on app close.

Bug: 123900446
Change-Id: Iaa2c06f19c535f72ae4c080b4bc847d336f1a77d
parent 5a93e5d8
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -1134,12 +1134,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,
+1 −1
Original line number Diff line number Diff line
@@ -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);