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

Commit b197610a authored by Alan Viverette's avatar Alan Viverette Committed by Android (Google) Code Review
Browse files

Merge "Reverse order of RT animations so enter animation works correctly"

parents 13553123 191ac0a7
Loading
Loading
Loading
Loading
+9 −8
Original line number Diff line number Diff line
@@ -131,15 +131,7 @@ class RippleBackground extends RippleComponent {
        mPropX = CanvasProperty.createFloat(0);
        mPropY = CanvasProperty.createFloat(0);

        // Linear "fast" enter based on current opacity.
        final int fastEnterDuration = (int) ((1 - mOpacity) * OPACITY_ENTER_DURATION_FAST);
        if (fastEnterDuration > 0) {
            final RenderNodeAnimator enter = new RenderNodeAnimator(
                    mPropPaint, RenderNodeAnimator.PAINT_ALPHA, targetAlpha);
            enter.setInterpolator(LINEAR_INTERPOLATOR);
            enter.setDuration(fastEnterDuration);
            set.add(enter);
        }

        // Linear exit after enter is completed.
        final RenderNodeAnimator exit = new RenderNodeAnimator(
@@ -149,6 +141,15 @@ class RippleBackground extends RippleComponent {
        exit.setStartDelay(fastEnterDuration);
        set.add(exit);

        // Linear "fast" enter based on current opacity.
        if (fastEnterDuration > 0) {
            final RenderNodeAnimator enter = new RenderNodeAnimator(
                    mPropPaint, RenderNodeAnimator.PAINT_ALPHA, targetAlpha);
            enter.setInterpolator(LINEAR_INTERPOLATOR);
            enter.setDuration(fastEnterDuration);
            set.add(enter);
        }

        return set;
    }