package m;

import android.content.res.ColorStateList;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;

/* JADX INFO: renamed from: m.q, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C0877q {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final AbstractC0875p f9230a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public ColorStateList f9231b = null;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public PorterDuff.Mode f9232c = null;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public boolean f9233d = false;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public boolean f9234e = false;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public boolean f9235f;

    public C0877q(AbstractC0875p abstractC0875p) {
        this.f9230a = abstractC0875p;
    }

    public final void a() {
        AbstractC0875p abstractC0875p = this.f9230a;
        Drawable buttonDrawable = abstractC0875p.getButtonDrawable();
        if (buttonDrawable != null) {
            if (this.f9233d || this.f9234e) {
                Drawable drawableMutate = buttonDrawable.mutate();
                if (this.f9233d) {
                    drawableMutate.setTintList(this.f9231b);
                }
                if (this.f9234e) {
                    drawableMutate.setTintMode(this.f9232c);
                }
                if (drawableMutate.isStateful()) {
                    drawableMutate.setState(abstractC0875p.getDrawableState());
                }
                abstractC0875p.setButtonDrawable(drawableMutate);
            }
        }
    }
}
