package c.b.f;

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.CheckBox;
import com.ifpdos.debugmenu.R;

/* JADX INFO: compiled from: AppCompatCheckBox.java */
/* JADX INFO: loaded from: classes.dex */
public class i extends CheckBox {

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final l f860b;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final g f861e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final d0 f862f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public p f863g;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public i(Context context, AttributeSet attributeSet) {
        super(context, attributeSet, R.attr.checkboxStyle);
        a1.a(context);
        y0.a(this, getContext());
        l lVar = new l(this);
        this.f860b = lVar;
        lVar.b(attributeSet, R.attr.checkboxStyle);
        g gVar = new g(this);
        this.f861e = gVar;
        gVar.d(attributeSet, R.attr.checkboxStyle);
        d0 d0Var = new d0(this);
        this.f862f = d0Var;
        d0Var.g(attributeSet, R.attr.checkboxStyle);
        getEmojiTextViewHelper().a(attributeSet, R.attr.checkboxStyle);
    }

    private p getEmojiTextViewHelper() {
        if (this.f863g == null) {
            this.f863g = new p(this);
        }
        return this.f863g;
    }

    @Override // android.widget.CompoundButton, android.widget.TextView, android.view.View
    public void drawableStateChanged() {
        super.drawableStateChanged();
        g gVar = this.f861e;
        if (gVar != null) {
            gVar.a();
        }
        d0 d0Var = this.f862f;
        if (d0Var != null) {
            d0Var.b();
        }
    }

    @Override // android.widget.CompoundButton, android.widget.TextView
    public int getCompoundPaddingLeft() {
        int compoundPaddingLeft = super.getCompoundPaddingLeft();
        l lVar = this.f860b;
        return compoundPaddingLeft;
    }

    public ColorStateList getSupportBackgroundTintList() {
        g gVar = this.f861e;
        if (gVar != null) {
            return gVar.b();
        }
        return null;
    }

    public PorterDuff.Mode getSupportBackgroundTintMode() {
        g gVar = this.f861e;
        if (gVar != null) {
            return gVar.c();
        }
        return null;
    }

    public ColorStateList getSupportButtonTintList() {
        l lVar = this.f860b;
        if (lVar != null) {
            return lVar.f875b;
        }
        return null;
    }

    public PorterDuff.Mode getSupportButtonTintMode() {
        l lVar = this.f860b;
        if (lVar != null) {
            return lVar.f876c;
        }
        return null;
    }

    public ColorStateList getSupportCompoundDrawablesTintList() {
        return this.f862f.d();
    }

    public PorterDuff.Mode getSupportCompoundDrawablesTintMode() {
        return this.f862f.e();
    }

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

    @Override // android.view.View
    public void setBackgroundDrawable(Drawable drawable) {
        super.setBackgroundDrawable(drawable);
        g gVar = this.f861e;
        if (gVar != null) {
            gVar.e();
        }
    }

    @Override // android.view.View
    public void setBackgroundResource(int i2) {
        super.setBackgroundResource(i2);
        g gVar = this.f861e;
        if (gVar != null) {
            gVar.f(i2);
        }
    }

    @Override // android.widget.CompoundButton
    public void setButtonDrawable(Drawable drawable) {
        super.setButtonDrawable(drawable);
        l lVar = this.f860b;
        if (lVar != null) {
            if (lVar.f879f) {
                lVar.f879f = false;
            } else {
                lVar.f879f = true;
                lVar.a();
            }
        }
    }

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

    @Override // android.widget.TextView
    public void setCompoundDrawablesRelative(Drawable drawable, Drawable drawable2, Drawable drawable3, Drawable drawable4) {
        super.setCompoundDrawablesRelative(drawable, drawable2, drawable3, drawable4);
        d0 d0Var = this.f862f;
        if (d0Var != null) {
            d0Var.b();
        }
    }

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

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

    public void setSupportBackgroundTintList(ColorStateList colorStateList) {
        g gVar = this.f861e;
        if (gVar != null) {
            gVar.h(colorStateList);
        }
    }

    public void setSupportBackgroundTintMode(PorterDuff.Mode mode) {
        g gVar = this.f861e;
        if (gVar != null) {
            gVar.i(mode);
        }
    }

    public void setSupportButtonTintList(ColorStateList colorStateList) {
        l lVar = this.f860b;
        if (lVar != null) {
            lVar.f875b = colorStateList;
            lVar.f877d = true;
            lVar.a();
        }
    }

    public void setSupportButtonTintMode(PorterDuff.Mode mode) {
        l lVar = this.f860b;
        if (lVar != null) {
            lVar.f876c = mode;
            lVar.f878e = true;
            lVar.a();
        }
    }

    public void setSupportCompoundDrawablesTintList(ColorStateList colorStateList) {
        this.f862f.m(colorStateList);
        this.f862f.b();
    }

    public void setSupportCompoundDrawablesTintMode(PorterDuff.Mode mode) {
        this.f862f.n(mode);
        this.f862f.b();
    }

    @Override // android.widget.CompoundButton
    public void setButtonDrawable(int i2) {
        setButtonDrawable(c.b.a.e(getContext(), i2));
    }
}
