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

Commit 191ac0a7 authored by Alan Viverette's avatar Alan Viverette
Browse files

Reverse order of RT animations so enter animation works correctly

Bug: 23428182
Change-Id: Id54ad19c6ee71e01656f79d413e45cf2e19bd1ea
parent db0fa33f
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;
    }