package o;

import android.R;
import android.content.res.ColorStateList;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.cO, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C0901cO extends C1074e8 {
    public static final int[][] r = {new int[]{R.attr.state_enabled, R.attr.state_checked}, new int[]{R.attr.state_enabled, -16842912}, new int[]{-16842910, R.attr.state_checked}, new int[]{-16842910, -16842912}};
    public ColorStateList p;
    public boolean q;

    private ColorStateList getMaterialThemeColorsTintList() {
        if (this.p == null) {
            int iS = AbstractC1692kh0.s(this, com.google.android.gms.common.R.attr.colorControlActivated);
            int iS2 = AbstractC1692kh0.s(this, com.google.android.gms.common.R.attr.colorOnSurface);
            int iS3 = AbstractC1692kh0.s(this, com.google.android.gms.common.R.attr.colorSurface);
            this.p = new ColorStateList(r, new int[]{AbstractC1692kh0.D(1.0f, iS3, iS), AbstractC1692kh0.D(0.54f, iS3, iS2), AbstractC1692kh0.D(0.38f, iS3, iS2), AbstractC1692kh0.D(0.38f, iS3, iS2)});
        }
        return this.p;
    }

    @Override // android.widget.TextView, android.view.View
    public final void onAttachedToWindow() {
        super.onAttachedToWindow();
        if (this.q && getButtonTintList() == null) {
            setUseMaterialThemeColors(true);
        }
    }

    public void setUseMaterialThemeColors(boolean z) {
        this.q = z;
        if (z) {
            setButtonTintList(getMaterialThemeColorsTintList());
        } else {
            setButtonTintList(null);
        }
    }
}
