77 lines
3.3 KiB
Java
77 lines
3.3 KiB
Java
|
package o;
|
||
|
|
||
|
import android.content.res.ColorStateList;
|
||
|
import android.graphics.Color;
|
||
|
import android.os.Build;
|
||
|
import android.util.StateSet;
|
||
|
|
||
|
/* renamed from: o.HUs, reason: case insensitive filesystem */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public final class C0459HUs {
|
||
|
public static final boolean b = true;
|
||
|
private static final int[] i = {android.R.attr.state_pressed};
|
||
|
private static final int[] c = {android.R.attr.state_hovered, android.R.attr.state_focused};
|
||
|
private static final int[] d = {android.R.attr.state_focused};
|
||
|
private static final int[] e = {android.R.attr.state_hovered};
|
||
|
private static final int[] h = {android.R.attr.state_selected, android.R.attr.state_pressed};
|
||
|
private static final int[] f = {android.R.attr.state_selected, android.R.attr.state_hovered, android.R.attr.state_focused};
|
||
|
private static final int[] j = {android.R.attr.state_selected, android.R.attr.state_focused};
|
||
|
private static final int[] g = {android.R.attr.state_selected, android.R.attr.state_hovered};
|
||
|
private static final int[] l = {android.R.attr.state_selected};
|
||
|
private static final int[] a = {android.R.attr.state_enabled, android.R.attr.state_pressed};
|
||
|
|
||
|
public static ColorStateList KG_(ColorStateList colorStateList) {
|
||
|
if (b) {
|
||
|
int[] iArr = l;
|
||
|
int KH_ = KH_(colorStateList, h);
|
||
|
int[] iArr2 = d;
|
||
|
return new ColorStateList(new int[][]{iArr, iArr2, StateSet.NOTHING}, new int[]{KH_, KH_(colorStateList, iArr2), KH_(colorStateList, i)});
|
||
|
}
|
||
|
int[] iArr3 = h;
|
||
|
int KH_2 = KH_(colorStateList, iArr3);
|
||
|
int[] iArr4 = f;
|
||
|
int KH_3 = KH_(colorStateList, iArr4);
|
||
|
int[] iArr5 = j;
|
||
|
int KH_4 = KH_(colorStateList, iArr5);
|
||
|
int[] iArr6 = g;
|
||
|
int KH_5 = KH_(colorStateList, iArr6);
|
||
|
int[] iArr7 = l;
|
||
|
int[] iArr8 = i;
|
||
|
int KH_6 = KH_(colorStateList, iArr8);
|
||
|
int[] iArr9 = c;
|
||
|
int KH_7 = KH_(colorStateList, iArr9);
|
||
|
int[] iArr10 = d;
|
||
|
int KH_8 = KH_(colorStateList, iArr10);
|
||
|
int[] iArr11 = e;
|
||
|
return new ColorStateList(new int[][]{iArr3, iArr4, iArr5, iArr6, iArr7, iArr8, iArr9, iArr10, iArr11, StateSet.NOTHING}, new int[]{KH_2, KH_3, KH_4, KH_5, 0, KH_6, KH_7, KH_8, KH_(colorStateList, iArr11), 0});
|
||
|
}
|
||
|
|
||
|
public static ColorStateList KI_(ColorStateList colorStateList) {
|
||
|
if (colorStateList != null) {
|
||
|
if (Build.VERSION.SDK_INT <= 27 && Color.alpha(colorStateList.getDefaultColor()) == 0) {
|
||
|
Color.alpha(colorStateList.getColorForState(a, 0));
|
||
|
}
|
||
|
return colorStateList;
|
||
|
}
|
||
|
return ColorStateList.valueOf(0);
|
||
|
}
|
||
|
|
||
|
public static boolean b(int[] iArr) {
|
||
|
boolean z = false;
|
||
|
boolean z2 = false;
|
||
|
for (int i2 : iArr) {
|
||
|
if (i2 == 16842910) {
|
||
|
z = true;
|
||
|
} else if (i2 == 16842908 || i2 == 16842919 || i2 == 16843623) {
|
||
|
z2 = true;
|
||
|
}
|
||
|
}
|
||
|
return z && z2;
|
||
|
}
|
||
|
|
||
|
private static int KH_(ColorStateList colorStateList, int[] iArr) {
|
||
|
int colorForState = colorStateList != null ? colorStateList.getColorForState(iArr, colorStateList.getDefaultColor()) : 0;
|
||
|
return b ? Rez.d(colorForState, Math.min(Color.alpha(colorForState) << 1, 255)) : colorForState;
|
||
|
}
|
||
|
}
|