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

Commit 96c5fc48 authored by Matthew Ng's avatar Matthew Ng
Browse files

Fix back button not disappearing

Regression from: ag/7031929

Fixes: 130695273
Test: manual
Change-Id: Ic228ff37e0460424703fd33bbc4e301cc66c9e4c
parent fab88a83
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -61,6 +61,7 @@ public class ButtonDispatcher {
    private final AnimatorListenerAdapter mFadeListener = new AnimatorListenerAdapter() {
        @Override
        public void onAnimationEnd(Animator animation) {
            mFadeAnimator = null;
            setVisibility(getAlpha() == 1 ? View.VISIBLE : View.INVISIBLE);
        }
    };
@@ -143,7 +144,6 @@ public class ButtonDispatcher {
        if (mVisibility == visibility) return;
        if (mFadeAnimator != null) {
            mFadeAnimator.cancel();
            mFadeAnimator = null;
        }

        mVisibility = visibility;
@@ -176,13 +176,13 @@ public class ButtonDispatcher {
            if (mFadeAnimator != null) {
                mFadeAnimator.cancel();
            }
            setVisibility(View.VISIBLE);
            mFadeAnimator = ValueAnimator.ofFloat(getAlpha(), alpha);
            mFadeAnimator.setDuration(duration);
            mFadeAnimator.setInterpolator(getAlpha() < alpha ? ALPHA_IN : ALPHA_OUT);
            mFadeAnimator.addListener(mFadeListener);
            mFadeAnimator.addUpdateListener(mAlphaListener);
            mFadeAnimator.start();
            setVisibility(View.VISIBLE);
        } else {
            mAlpha = alpha;
            final int N = mViews.size();