package d.b.g;

import android.R;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.widget.ToggleButton;

/* JADX INFO: loaded from: classes.dex */
public class d0 extends ToggleButton {

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

    /* JADX INFO: renamed from: m, reason: collision with root package name */
    public final z f1947m;

    public d0(Context context, AttributeSet attributeSet) {
        super(context, attributeSet, R.attr.buttonStyleToggle);
        u0.a(this, getContext());
        e eVar = new e(this);
        this.f1946f = eVar;
        eVar.d(attributeSet, R.attr.buttonStyleToggle);
        z zVar = new z(this);
        this.f1947m = zVar;
        zVar.e(attributeSet, R.attr.buttonStyleToggle);
    }

    @Override // android.widget.ToggleButton, android.widget.CompoundButton, android.widget.TextView, android.view.View
    public void drawableStateChanged() {
        super.drawableStateChanged();
        e eVar = this.f1946f;
        if (eVar != null) {
            eVar.a();
        }
        z zVar = this.f1947m;
        if (zVar != null) {
            zVar.b();
        }
    }

    public ColorStateList getSupportBackgroundTintList() {
        e eVar = this.f1946f;
        if (eVar != null) {
            return eVar.b();
        }
        return null;
    }

    public PorterDuff.Mode getSupportBackgroundTintMode() {
        e eVar = this.f1946f;
        if (eVar != null) {
            return eVar.c();
        }
        return null;
    }

    @Override // android.widget.ToggleButton, android.view.View
    public void setBackgroundDrawable(Drawable drawable) {
        super.setBackgroundDrawable(drawable);
        e eVar = this.f1946f;
        if (eVar != null) {
            eVar.e();
        }
    }

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

    public void setSupportBackgroundTintList(ColorStateList colorStateList) {
        e eVar = this.f1946f;
        if (eVar != null) {
            eVar.h(colorStateList);
        }
    }

    public void setSupportBackgroundTintMode(PorterDuff.Mode mode) {
        e eVar = this.f1946f;
        if (eVar != null) {
            eVar.i(mode);
        }
    }
}
