package o; import android.graphics.drawable.Animatable; import android.graphics.drawable.Drawable; import android.widget.ImageView; /* loaded from: classes.dex */ public abstract class QEG extends TOD { private Animatable d; protected abstract void c(Z z); public QEG(ImageView imageView) { super(imageView); } @Override // o.TOD, o.AbstractC0237CQu, o.YcZ public final void FU_(Drawable drawable) { super.FU_(drawable); b(null); ((ImageView) this.a).setImageDrawable(drawable); } @Override // o.AbstractC0237CQu, o.YcZ public final void avy_(Drawable drawable) { super.avy_(drawable); b(null); ((ImageView) this.a).setImageDrawable(drawable); } @Override // o.TOD, o.AbstractC0237CQu, o.YcZ public final void avx_(Drawable drawable) { super.avx_(drawable); Animatable animatable = this.d; if (animatable != null) { animatable.stop(); } b(null); ((ImageView) this.a).setImageDrawable(drawable); } @Override // o.YcZ public final void d(Z z) { b(z); } @Override // o.AbstractC0237CQu, o.Lco public final void a() { Animatable animatable = this.d; if (animatable != null) { animatable.start(); } } @Override // o.AbstractC0237CQu, o.Lco public final void c() { Animatable animatable = this.d; if (animatable != null) { animatable.stop(); } } private void b(Z z) { c((QEG) z); if (!(z instanceof Animatable)) { this.d = null; return; } Animatable animatable = (Animatable) z; this.d = animatable; animatable.start(); } }