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

118 lines
5.0 KiB
Java

package o;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.view.View;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import o.Prc;
/* loaded from: classes.dex */
public final class Gsu {
public static void d(Prc prc, View view, float[] fArr) {
Class<?> cls = view.getClass();
StringBuilder sb = new StringBuilder("set");
sb.append(prc.f);
String obj = sb.toString();
try {
boolean z = true;
switch (AnonymousClass4.a[prc.g.ordinal()]) {
case 1:
cls.getMethod(obj, Integer.TYPE).invoke(view, Integer.valueOf((int) fArr[0]));
return;
case 2:
cls.getMethod(obj, Float.TYPE).invoke(view, Float.valueOf(fArr[0]));
return;
case 3:
Method method = cls.getMethod(obj, Drawable.class);
int pow = (int) (((float) Math.pow(fArr[0], 0.45454545454545453d)) * 255.0f);
int i = (pow & (~(pow >> 31))) - 255;
int pow2 = (int) (((float) Math.pow(fArr[1], 0.45454545454545453d)) * 255.0f);
int i2 = (pow2 & (~(pow2 >> 31))) - 255;
int pow3 = (int) (((float) Math.pow(fArr[2], 0.45454545454545453d)) * 255.0f);
int i3 = (pow3 & (~(pow3 >> 31))) - 255;
int i4 = (int) (fArr[3] * 255.0f);
int i5 = (i4 & (~(i4 >> 31))) - 255;
ColorDrawable colorDrawable = new ColorDrawable();
colorDrawable.setColor((((i5 & (i5 >> 31)) + 255) << 24) | (((i & (i >> 31)) + 255) << 16) | (((i2 & (i2 >> 31)) + 255) << 8) | ((i3 & (i3 >> 31)) + 255));
method.invoke(view, colorDrawable);
return;
case 4:
Method method2 = cls.getMethod(obj, Integer.TYPE);
int pow4 = (int) (((float) Math.pow(fArr[0], 0.45454545454545453d)) * 255.0f);
int i6 = (pow4 & (~(pow4 >> 31))) - 255;
int pow5 = (int) (((float) Math.pow(fArr[1], 0.45454545454545453d)) * 255.0f);
int i7 = (pow5 & (~(pow5 >> 31))) - 255;
int pow6 = (int) (((float) Math.pow(fArr[2], 0.45454545454545453d)) * 255.0f);
int i8 = (pow6 & (~(pow6 >> 31))) - 255;
int i9 = (int) (fArr[3] * 255.0f);
int i10 = (i9 & (~(i9 >> 31))) - 255;
method2.invoke(view, Integer.valueOf((((i10 & (i10 >> 31)) + 255) << 24) | (((i6 & (i6 >> 31)) + 255) << 16) | (((i7 & (i7 >> 31)) + 255) << 8) | ((i8 & (i8 >> 31)) + 255)));
return;
case 5:
StringBuilder sb2 = new StringBuilder("unable to interpolate strings ");
sb2.append(prc.f);
throw new RuntimeException(sb2.toString());
case 6:
Method method3 = cls.getMethod(obj, Boolean.TYPE);
Object[] objArr = new Object[1];
if (fArr[0] <= 0.5f) {
z = false;
}
objArr[0] = Boolean.valueOf(z);
method3.invoke(view, objArr);
return;
case 7:
cls.getMethod(obj, Float.TYPE).invoke(view, Float.valueOf(fArr[0]));
return;
default:
return;
}
} catch (IllegalAccessException unused) {
C6805ccO.d(view);
} catch (NoSuchMethodException unused2) {
C6805ccO.d(view);
} catch (InvocationTargetException unused3) {
}
}
/* renamed from: o.Gsu$4, reason: invalid class name */
/* loaded from: classes.dex */
static /* synthetic */ class AnonymousClass4 {
static final int[] a;
static {
int[] iArr = new int[Prc.LWm.values().length];
a = iArr;
try {
iArr[Prc.LWm.INT_TYPE.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
a[Prc.LWm.FLOAT_TYPE.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
a[Prc.LWm.COLOR_DRAWABLE_TYPE.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
a[Prc.LWm.COLOR_TYPE.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
a[Prc.LWm.STRING_TYPE.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
try {
a[Prc.LWm.BOOLEAN_TYPE.ordinal()] = 6;
} catch (NoSuchFieldError unused6) {
}
try {
a[Prc.LWm.DIMENSION_TYPE.ordinal()] = 7;
} catch (NoSuchFieldError unused7) {
}
}
}
}