what-the-bank/sources/o/nKv.java

68 lines
2.3 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package o;
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 o.SYO;
/* loaded from: classes.dex */
public final class nKv {
private static final ThreadLocal<TypedValue> j = new ThreadLocal<>();
static final int[] e = {-16842910};
static final int[] b = {android.R.attr.state_focused};
static final int[] d = {android.R.attr.state_pressed};
static final int[] c = {android.R.attr.state_checked};
static final int[] a = new int[0];
private static final int[] h = new int[1];
public static int d(Context context, int i) {
int[] iArr = h;
iArr[0] = i;
C0683McA c0683McA = new C0683McA(context, context.obtainStyledAttributes((AttributeSet) null, iArr));
try {
return c0683McA.d.getColor(0, 0);
} finally {
c0683McA.d.recycle();
}
}
public static ColorStateList jJ_(Context context, int i) {
int[] iArr = h;
iArr[0] = i;
C0683McA c0683McA = new C0683McA(context, context.obtainStyledAttributes((AttributeSet) null, iArr));
try {
return c0683McA.jK_(0);
} finally {
c0683McA.d.recycle();
}
}
public static int b(Context context, int i) {
ColorStateList jJ_ = jJ_(context, i);
if (jJ_ != null && jJ_.isStateful()) {
return jJ_.getColorForState(e, jJ_.getDefaultColor());
}
ThreadLocal<TypedValue> threadLocal = j;
TypedValue typedValue = threadLocal.get();
if (typedValue == null) {
typedValue = new TypedValue();
threadLocal.set(typedValue);
}
context.getTheme().resolveAttribute(android.R.attr.disabledAlpha, typedValue, true);
float f = typedValue.getFloat();
return Rez.d(d(context, i), Math.round(Color.alpha(r4) * f));
}
public static void b(Context context) {
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(SYO.ZqN.AppCompatTheme);
try {
obtainStyledAttributes.hasValue(SYO.ZqN.AppCompatTheme_windowActionBar);
} finally {
obtainStyledAttributes.recycle();
}
}
}