package androidx.appcompat.widget; import android.content.Context; import android.content.res.ColorStateList; import android.graphics.Bitmap; import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; import android.net.Uri; import android.util.AttributeSet; import android.widget.ImageButton; import o.SYO; import o.WpN; import o.ZzE; import o.nKv; import o.zwp; /* loaded from: classes.dex */ public class AppCompatImageButton extends ImageButton { private final zwp a; private final WpN b; private boolean c; public AppCompatImageButton(Context context) { this(context, null); } public AppCompatImageButton(Context context, AttributeSet attributeSet) { this(context, attributeSet, SYO.IeS.imageButtonStyle); } public AppCompatImageButton(Context context, AttributeSet attributeSet, int i) { super(ZzE.b(context), attributeSet, i); this.c = false; nKv.b(getContext()); WpN wpN = new WpN(this); this.b = wpN; wpN.fy_(attributeSet, i); zwp zwpVar = new zwp(this); this.a = zwpVar; zwpVar.gs_(attributeSet, i); } @Override // android.widget.ImageView public void setImageResource(int i) { this.a.a(i); } @Override // android.widget.ImageView public void setImageDrawable(Drawable drawable) { zwp zwpVar = this.a; if (zwpVar != null && drawable != null && !this.c) { zwpVar.gt_(drawable); } super.setImageDrawable(drawable); zwp zwpVar2 = this.a; if (zwpVar2 != null) { zwpVar2.e(); if (this.c) { return; } this.a.b(); } } @Override // android.widget.ImageView public void setImageBitmap(Bitmap bitmap) { super.setImageBitmap(bitmap); zwp zwpVar = this.a; if (zwpVar != null) { zwpVar.e(); } } @Override // android.widget.ImageView public void setImageURI(Uri uri) { super.setImageURI(uri); zwp zwpVar = this.a; if (zwpVar != null) { zwpVar.e(); } } @Override // android.view.View public void setBackgroundResource(int i) { super.setBackgroundResource(i); WpN wpN = this.b; if (wpN != null) { wpN.c(i); } } @Override // android.view.View public void setBackgroundDrawable(Drawable drawable) { super.setBackgroundDrawable(drawable); WpN wpN = this.b; if (wpN != null) { wpN.fz_(drawable); } } public void setSupportBackgroundTintList(ColorStateList colorStateList) { WpN wpN = this.b; if (wpN != null) { wpN.fB_(colorStateList); } } public void setSupportBackgroundTintMode(PorterDuff.Mode mode) { WpN wpN = this.b; if (wpN != null) { wpN.fC_(mode); } } public void setSupportImageTintList(ColorStateList colorStateList) { zwp zwpVar = this.a; if (zwpVar != null) { zwpVar.gu_(colorStateList); } } public void setSupportImageTintMode(PorterDuff.Mode mode) { zwp zwpVar = this.a; if (zwpVar != null) { zwpVar.gv_(mode); } } @Override // android.widget.ImageView, android.view.View protected void drawableStateChanged() { super.drawableStateChanged(); WpN wpN = this.b; if (wpN != null) { wpN.a(); } zwp zwpVar = this.a; if (zwpVar != null) { zwpVar.e(); } } @Override // android.widget.ImageView, android.view.View public boolean hasOverlappingRendering() { return this.a.a() && super.hasOverlappingRendering(); } @Override // android.widget.ImageView public void setImageLevel(int i) { super.setImageLevel(i); this.c = true; } }