package defpackage;

import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.text.InputFilter;
import android.util.AttributeSet;
import android.widget.RadioButton;

/* JADX INFO: loaded from: classes.dex */
public class dp extends RadioButton implements ip9, gp9, jj2, jp9 {
    private so mAppCompatEmojiTextHelper;
    private final on mBackgroundTintHelper;
    private final un mCompoundButtonHelper;
    private final tp mTextHelper;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public dp(Context context, AttributeSet attributeSet, int i) {
        super(context, attributeSet, i);
        cp9.a(context);
        rl9.a(this, getContext());
        un unVar = new un(this);
        this.mCompoundButtonHelper = unVar;
        unVar.b(attributeSet, i);
        on onVar = new on(this);
        this.mBackgroundTintHelper = onVar;
        onVar.d(attributeSet, i);
        tp tpVar = new tp(this);
        this.mTextHelper = tpVar;
        tpVar.f(attributeSet, i);
        getEmojiTextViewHelper().a(attributeSet, i);
    }

    @vo6
    private so getEmojiTextViewHelper() {
        if (this.mAppCompatEmojiTextHelper == null) {
            this.mAppCompatEmojiTextHelper = new so(this);
        }
        return this.mAppCompatEmojiTextHelper;
    }

    @Override // android.widget.CompoundButton, android.widget.TextView, android.view.View
    public void drawableStateChanged() {
        super.drawableStateChanged();
        on onVar = this.mBackgroundTintHelper;
        if (onVar != null) {
            onVar.a();
        }
        tp tpVar = this.mTextHelper;
        if (tpVar != null) {
            tpVar.b();
        }
    }

    @Override // android.widget.CompoundButton, android.widget.TextView
    public int getCompoundPaddingLeft() {
        int compoundPaddingLeft = super.getCompoundPaddingLeft();
        un unVar = this.mCompoundButtonHelper;
        if (unVar != null) {
            unVar.getClass();
        }
        return compoundPaddingLeft;
    }

    @m38
    @rq6
    public ColorStateList getSupportBackgroundTintList() {
        on onVar = this.mBackgroundTintHelper;
        if (onVar != null) {
            return onVar.b();
        }
        return null;
    }

    @m38
    @rq6
    public PorterDuff.Mode getSupportBackgroundTintMode() {
        on onVar = this.mBackgroundTintHelper;
        if (onVar != null) {
            return onVar.c();
        }
        return null;
    }

    @Override // defpackage.ip9
    @m38
    @rq6
    public ColorStateList getSupportButtonTintList() {
        un unVar = this.mCompoundButtonHelper;
        if (unVar != null) {
            return unVar.b;
        }
        return null;
    }

    @m38
    @rq6
    public PorterDuff.Mode getSupportButtonTintMode() {
        un unVar = this.mCompoundButtonHelper;
        if (unVar != null) {
            return unVar.c;
        }
        return null;
    }

    @m38
    @rq6
    public ColorStateList getSupportCompoundDrawablesTintList() {
        return this.mTextHelper.d();
    }

    @m38
    @rq6
    public PorterDuff.Mode getSupportCompoundDrawablesTintMode() {
        return this.mTextHelper.e();
    }

    public boolean isEmojiCompatEnabled() {
        return getEmojiTextViewHelper().b.b();
    }

    @Override // android.widget.TextView
    public void setAllCaps(boolean z) {
        super.setAllCaps(z);
        getEmojiTextViewHelper().b(z);
    }

    @Override // android.view.View
    public void setBackgroundDrawable(@rq6 Drawable drawable) {
        super.setBackgroundDrawable(drawable);
        on onVar = this.mBackgroundTintHelper;
        if (onVar != null) {
            onVar.e();
        }
    }

    @Override // android.view.View
    public void setBackgroundResource(@of2 int i) {
        super.setBackgroundResource(i);
        on onVar = this.mBackgroundTintHelper;
        if (onVar != null) {
            onVar.f(i);
        }
    }

    @Override // android.widget.CompoundButton
    public void setButtonDrawable(Drawable drawable) {
        super.setButtonDrawable(drawable);
        un unVar = this.mCompoundButtonHelper;
        if (unVar != null) {
            if (unVar.f) {
                unVar.f = false;
            } else {
                unVar.f = true;
                unVar.a();
            }
        }
    }

    @Override // android.widget.TextView
    public void setCompoundDrawables(@rq6 Drawable drawable, @rq6 Drawable drawable2, @rq6 Drawable drawable3, @rq6 Drawable drawable4) {
        super.setCompoundDrawables(drawable, drawable2, drawable3, drawable4);
        tp tpVar = this.mTextHelper;
        if (tpVar != null) {
            tpVar.b();
        }
    }

    @Override // android.widget.TextView
    @l18
    public void setCompoundDrawablesRelative(@rq6 Drawable drawable, @rq6 Drawable drawable2, @rq6 Drawable drawable3, @rq6 Drawable drawable4) {
        super.setCompoundDrawablesRelative(drawable, drawable2, drawable3, drawable4);
        tp tpVar = this.mTextHelper;
        if (tpVar != null) {
            tpVar.b();
        }
    }

    public void setEmojiCompatEnabled(boolean z) {
        getEmojiTextViewHelper().c(z);
    }

    @Override // android.widget.TextView
    public void setFilters(@vo6 InputFilter[] inputFilterArr) {
        super.setFilters(getEmojiTextViewHelper().b.a(inputFilterArr));
    }

    @m38
    public void setSupportBackgroundTintList(@rq6 ColorStateList colorStateList) {
        on onVar = this.mBackgroundTintHelper;
        if (onVar != null) {
            onVar.h(colorStateList);
        }
    }

    @m38
    public void setSupportBackgroundTintMode(@rq6 PorterDuff.Mode mode) {
        on onVar = this.mBackgroundTintHelper;
        if (onVar != null) {
            onVar.i(mode);
        }
    }

    @Override // defpackage.ip9
    @m38
    public void setSupportButtonTintList(@rq6 ColorStateList colorStateList) {
        un unVar = this.mCompoundButtonHelper;
        if (unVar != null) {
            unVar.b = colorStateList;
            unVar.d = true;
            unVar.a();
        }
    }

    @Override // defpackage.ip9
    @m38
    public void setSupportButtonTintMode(@rq6 PorterDuff.Mode mode) {
        un unVar = this.mCompoundButtonHelper;
        if (unVar != null) {
            unVar.c = mode;
            unVar.e = true;
            unVar.a();
        }
    }

    @m38
    public void setSupportCompoundDrawablesTintList(@rq6 ColorStateList colorStateList) {
        this.mTextHelper.h(colorStateList);
        this.mTextHelper.b();
    }

    @m38
    public void setSupportCompoundDrawablesTintMode(@rq6 PorterDuff.Mode mode) {
        this.mTextHelper.i(mode);
        this.mTextHelper.b();
    }

    @Override // android.widget.CompoundButton
    public void setButtonDrawable(@of2 int i) {
        setButtonDrawable(gp.a(getContext(), i));
    }
}
