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

Commit 26ab4621 authored by Tony Wickham's avatar Tony Wickham
Browse files

Have AlphaUpdateListener update visibility in onAnimationEnd()

Previously we were only updating visibility in onAnimationSuccess(), which doesn't handle the canceled case.

Test: swipe up from nav bar twice in all apps, ensure all apps is invisible/non-interactable
Bug: 190315266
Change-Id: Ic59e6d4b404de4ee2d17c45d6fa59e2aee70c65f
parent 93c0cfad
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.launcher3.anim;

import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ValueAnimator;
import android.animation.ValueAnimator.AnimatorUpdateListener;
import android.view.View;
@@ -25,7 +26,7 @@ import android.view.ViewGroup;
/**
 * A convenience class to update a view's visibility state after an alpha animation.
 */
public class AlphaUpdateListener extends AnimationSuccessListener
public class AlphaUpdateListener extends AnimatorListenerAdapter
        implements AnimatorUpdateListener {
    public static final float ALPHA_CUTOFF_THRESHOLD = 0.01f;

@@ -41,7 +42,7 @@ public class AlphaUpdateListener extends AnimationSuccessListener
    }

    @Override
    public void onAnimationSuccess(Animator animator) {
    public void onAnimationEnd(Animator animator) {
        updateVisibility(mView);
    }