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

Commit a6e15ec2 authored by Evan Charlton's avatar Evan Charlton
Browse files

Always animate drawables when given animations

When given an animated drawable, always animate it, rather than only
when the call isn't connected.

Bug: 18695179
Change-Id: Ia9b320e2f5f47ee7fdfb489b91c736912dcdfd16
parent 18de8c50
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -529,13 +529,12 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
            if (state == Call.State.ACTIVE || state == Call.State.CONFERENCED
                    || TextUtils.isEmpty(callStateLabel)) {
                mCallStateIcon.clearAnimation();
            } else {
                if (callStateIcon instanceof AnimationDrawable) {
                    // Animate the drawable instead of the view
                    ((AnimationDrawable) callStateIcon).start();
            } else {
                mCallStateIcon.startAnimation(mPulseAnimation);
            }

            if (callStateIcon instanceof AnimationDrawable) {
                ((AnimationDrawable) callStateIcon).start();
            }
        } else {
            Animation callStateIconAnimation = mCallStateIcon.getAnimation();