package defpackage;

import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.Bitmap;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.RippleDrawable;
import android.net.Uri;
import android.util.AttributeSet;
import android.widget.ImageButton;
import android.widget.ImageView;

/* renamed from: ᵕˑˀᵞ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public class C2292 extends ImageButton {

    /* renamed from: ᵢˇᵭ, reason: contains not printable characters */
    public final C4782 f8966;

    /* renamed from: ᵧᵾˀˈ, reason: contains not printable characters */
    public final C1611 f8967;

    /* renamed from: ᵿʗᵝʽ, reason: contains not printable characters */
    public boolean f8968;

    public C2292(Context context, AttributeSet attributeSet, int i) {
        super(context, attributeSet, i);
        this.f8968 = false;
        AbstractC3247.m7608(getContext(), this);
        C1611 c1611 = new C1611(this);
        this.f8967 = c1611;
        c1611.m4617(attributeSet, i);
        C4782 c4782 = new C4782(this);
        this.f8966 = c4782;
        c4782.m10092(attributeSet, i);
    }

    @Override // android.widget.ImageView, android.view.View
    public final void drawableStateChanged() {
        super.drawableStateChanged();
        C1611 c1611 = this.f8967;
        if (c1611 != null) {
            c1611.m4619();
        }
        C4782 c4782 = this.f8966;
        if (c4782 != null) {
            c4782.m10091();
        }
    }

    public ColorStateList getSupportBackgroundTintList() {
        C1611 c1611 = this.f8967;
        if (c1611 != null) {
            return c1611.m4620();
        }
        return null;
    }

    public PorterDuff.Mode getSupportBackgroundTintMode() {
        C1611 c1611 = this.f8967;
        if (c1611 != null) {
            return c1611.m4622();
        }
        return null;
    }

    public ColorStateList getSupportImageTintList() {
        C1894 c1894;
        C4782 c4782 = this.f8966;
        if (c4782 == null || (c1894 = (C1894) c4782.f17767) == null) {
            return null;
        }
        return (ColorStateList) c1894.f7628;
    }

    public PorterDuff.Mode getSupportImageTintMode() {
        C1894 c1894;
        C4782 c4782 = this.f8966;
        if (c4782 == null || (c1894 = (C1894) c4782.f17767) == null) {
            return null;
        }
        return (PorterDuff.Mode) c1894.f7631;
    }

    @Override // android.widget.ImageView, android.view.View
    public final boolean hasOverlappingRendering() {
        return !(((ImageView) this.f8966.f17768).getBackground() instanceof RippleDrawable) && super.hasOverlappingRendering();
    }

    @Override // android.view.View
    public void setBackgroundDrawable(Drawable drawable) {
        super.setBackgroundDrawable(drawable);
        C1611 c1611 = this.f8967;
        if (c1611 != null) {
            c1611.m4618();
        }
    }

    @Override // android.view.View
    public void setBackgroundResource(int i) {
        super.setBackgroundResource(i);
        C1611 c1611 = this.f8967;
        if (c1611 != null) {
            c1611.m4602(i);
        }
    }

    @Override // android.widget.ImageView
    public void setImageBitmap(Bitmap bitmap) {
        super.setImageBitmap(bitmap);
        C4782 c4782 = this.f8966;
        if (c4782 != null) {
            c4782.m10091();
        }
    }

    @Override // android.widget.ImageView
    public void setImageDrawable(Drawable drawable) {
        C4782 c4782 = this.f8966;
        if (c4782 != null && drawable != null && !this.f8968) {
            c4782.f17765 = drawable.getLevel();
        }
        super.setImageDrawable(drawable);
        if (c4782 != null) {
            c4782.m10091();
            if (this.f8968) {
                return;
            }
            ImageView imageView = (ImageView) c4782.f17768;
            if (imageView.getDrawable() != null) {
                imageView.getDrawable().setLevel(c4782.f17765);
            }
        }
    }

    @Override // android.widget.ImageView
    public void setImageLevel(int i) {
        super.setImageLevel(i);
        this.f8968 = true;
    }

    @Override // android.widget.ImageView
    public void setImageResource(int i) {
        C4782 c4782 = this.f8966;
        ImageView imageView = (ImageView) c4782.f17768;
        if (i != 0) {
            Drawable drawable = ᵕˏᵛ.ˑᵥˁ(imageView.getContext(), i);
            if (drawable != null) {
                AbstractC1991.m5513(drawable);
            }
            imageView.setImageDrawable(drawable);
        } else {
            imageView.setImageDrawable(null);
        }
        c4782.m10091();
    }

    @Override // android.widget.ImageView
    public void setImageURI(Uri uri) {
        super.setImageURI(uri);
        C4782 c4782 = this.f8966;
        if (c4782 != null) {
            c4782.m10091();
        }
    }

    public void setSupportBackgroundTintList(ColorStateList colorStateList) {
        C1611 c1611 = this.f8967;
        if (c1611 != null) {
            c1611.m4611(colorStateList);
        }
    }

    public void setSupportBackgroundTintMode(PorterDuff.Mode mode) {
        C1611 c1611 = this.f8967;
        if (c1611 != null) {
            c1611.m4626(mode);
        }
    }

    public void setSupportImageTintList(ColorStateList colorStateList) {
        C4782 c4782 = this.f8966;
        if (c4782 != null) {
            if (((C1894) c4782.f17767) == null) {
                c4782.f17767 = new C1894();
            }
            C1894 c1894 = (C1894) c4782.f17767;
            c1894.f7628 = colorStateList;
            c1894.f7630 = true;
            c4782.m10091();
        }
    }

    public void setSupportImageTintMode(PorterDuff.Mode mode) {
        C4782 c4782 = this.f8966;
        if (c4782 != null) {
            if (((C1894) c4782.f17767) == null) {
                c4782.f17767 = new C1894();
            }
            C1894 c1894 = (C1894) c4782.f17767;
            c1894.f7631 = mode;
            c1894.f7629 = true;
            c4782.m10091();
        }
    }
}
