package X6FRs_4.KQgRr5e_0.LGe8pk_15;

import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.Color;
import android.util.AttributeSet;
import android.util.TypedValue;
/* compiled from: ThemeUtils.java */
/* loaded from: classes.dex */
public class G83uNX_24 {
    public static final ThreadLocal<TypedValue> KQgRr5e_0 = new ThreadLocal<>();

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public static final int[] f673KQgRr5e_0 = {-16842910};
    public static final int[] QxJ9d_1 = {16842908};
    public static final int[] PGPF6hQ_2 = {16842919};

    /* renamed from: Mqv2r_3  reason: collision with root package name */
    public static final int[] f3156Mqv2r_3 = {16842912};

    /* renamed from: X6FRs_4  reason: collision with root package name */
    public static final int[] f3157X6FRs_4 = new int[0];

    /* renamed from: IFxWkV_5  reason: collision with root package name */
    public static final int[] f3155IFxWkV_5 = new int[1];

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public static ColorStateList m387KQgRr5e_0(Context context, int i) {
        int[] iArr = f3155IFxWkV_5;
        iArr[0] = i;
        NzhupJ_29 KQgRr5e_02 = NzhupJ_29.KQgRr5e_0(context, (AttributeSet) null, iArr);
        try {
            return KQgRr5e_02.KQgRr5e_0(0);
        } finally {
            KQgRr5e_02.KQgRr5e_0();
        }
    }

    public static int QxJ9d_1(Context context, int i) {
        int[] iArr = f3155IFxWkV_5;
        iArr[0] = i;
        NzhupJ_29 KQgRr5e_02 = NzhupJ_29.KQgRr5e_0(context, (AttributeSet) null, iArr);
        try {
            return KQgRr5e_02.KQgRr5e_0(0, 0);
        } finally {
            KQgRr5e_02.KQgRr5e_0();
        }
    }

    public static int KQgRr5e_0(Context context, int i) {
        ColorStateList m387KQgRr5e_0 = m387KQgRr5e_0(context, i);
        if (m387KQgRr5e_0 != null && m387KQgRr5e_0.isStateful()) {
            return m387KQgRr5e_0.getColorForState(f673KQgRr5e_0, m387KQgRr5e_0.getDefaultColor());
        }
        TypedValue KQgRr5e_02 = KQgRr5e_0();
        context.getTheme().resolveAttribute(16842803, KQgRr5e_02, true);
        return KQgRr5e_0(context, i, KQgRr5e_02.getFloat());
    }

    public static TypedValue KQgRr5e_0() {
        TypedValue typedValue = KQgRr5e_0.get();
        if (typedValue == null) {
            TypedValue typedValue2 = new TypedValue();
            KQgRr5e_0.set(typedValue2);
            return typedValue2;
        }
        return typedValue;
    }

    public static int KQgRr5e_0(Context context, int i, float f) {
        int QxJ9d_12 = QxJ9d_1(context, i);
        return X6FRs_4.IMuAHx_6.IFxWkV_5.KQgRr5e_0.PGPF6hQ_2(QxJ9d_12, Math.round(Color.alpha(QxJ9d_12) * f));
    }
}
