package defpackage;

import android.R;
import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.TypedArray;
import android.graphics.Color;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.view.View;

/* renamed from: ᵢʤ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public abstract class AbstractC3247 {

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public static final ThreadLocal f12237 = new ThreadLocal();

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public static final int[] f12238 = {-16842910};

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public static final int[] f12236 = {R.attr.state_focused};

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public static final int[] f12239 = {R.attr.state_pressed};

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public static final int[] f12233 = {R.attr.state_checked};

    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public static final int[] f12235 = new int[0];

    /* renamed from: ˎˏʜʾ, reason: contains not printable characters */
    public static final int[] f12234 = new int[1];

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public static int m7607(Context context, int i) {
        int[] iArr = f12234;
        iArr[0] = i;
        TypedArray typedArrayObtainStyledAttributes = context.obtainStyledAttributes((AttributeSet) null, iArr);
        try {
            return typedArrayObtainStyledAttributes.getColor(0, 0);
        } finally {
            typedArrayObtainStyledAttributes.recycle();
        }
    }

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public static void m7608(Context context, View view) {
        TypedArray typedArrayObtainStyledAttributes = context.obtainStyledAttributes(AbstractC0542.f2823);
        try {
            if (!typedArrayObtainStyledAttributes.hasValue(117)) {
                view.getClass().toString();
            }
        } finally {
            typedArrayObtainStyledAttributes.recycle();
        }
    }

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public static int m7609(Context context, int i) {
        ColorStateList colorStateListM7610 = m7610(context, i);
        if (colorStateListM7610 != null && colorStateListM7610.isStateful()) {
            return colorStateListM7610.getColorForState(f12238, colorStateListM7610.getDefaultColor());
        }
        ThreadLocal threadLocal = f12237;
        TypedValue typedValue = (TypedValue) threadLocal.get();
        if (typedValue == null) {
            typedValue = new TypedValue();
            threadLocal.set(typedValue);
        }
        context.getTheme().resolveAttribute(R.attr.disabledAlpha, typedValue, true);
        float f = typedValue.getFloat();
        return AbstractC1814.m5137(m7607(context, i), Math.round(Color.alpha(r4) * f));
    }

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public static ColorStateList m7610(Context context, int i) {
        ColorStateList colorStateList;
        int resourceId;
        int[] iArr = f12234;
        iArr[0] = i;
        TypedArray typedArrayObtainStyledAttributes = context.obtainStyledAttributes((AttributeSet) null, iArr);
        try {
            if (!typedArrayObtainStyledAttributes.hasValue(0) || (resourceId = typedArrayObtainStyledAttributes.getResourceId(0, 0)) == 0 || (colorStateList = AbstractC5363.m10989(context, resourceId)) == null) {
                colorStateList = typedArrayObtainStyledAttributes.getColorStateList(0);
            }
            return colorStateList;
        } finally {
            typedArrayObtainStyledAttributes.recycle();
        }
    }
}
