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

114 lines
4.4 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package o;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.util.TypedValue;
import o.C17052tZT;
/* loaded from: classes2.dex */
public final class uqW {
public static final int[] c = {C17052tZT.IeS.colorPrimary};
public static final int[] e = {C17052tZT.IeS.colorPrimaryVariant};
public static C0683McA Kd_(Context context, AttributeSet attributeSet, int[] iArr, int i, int i2, int... iArr2) {
Kb_(context, attributeSet, i, i2);
Kc_(context, attributeSet, iArr, i, i2, iArr2);
return new C0683McA(context, context.obtainStyledAttributes(attributeSet, iArr, i, i2));
}
public static void Kb_(Context context, AttributeSet attributeSet, int i, int i2) {
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, C17052tZT.jNh.ThemeEnforcement, i, i2);
boolean z = obtainStyledAttributes.getBoolean(C17052tZT.jNh.ThemeEnforcement_enforceMaterialTheme, false);
obtainStyledAttributes.recycle();
if (z) {
TypedValue typedValue = new TypedValue();
if (!context.getTheme().resolveAttribute(C17052tZT.IeS.isMaterialTheme, typedValue, true) || (typedValue.type == 18 && typedValue.data == 0)) {
b(context, e, "Theme.MaterialComponents");
}
}
b(context, c, "Theme.AppCompat");
}
/* JADX WARN: Code restructure failed: missing block: B:26:0x003b, code lost:
if (r0.getResourceId(o.C17052tZT.jNh.ThemeEnforcement_android_textAppearance, -1) != (-1)) goto L19;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public static void Kc_(android.content.Context r5, android.util.AttributeSet r6, int[] r7, int r8, int r9, int... r10) {
/*
int[] r0 = o.C17052tZT.jNh.ThemeEnforcement
android.content.res.TypedArray r0 = r5.obtainStyledAttributes(r6, r0, r8, r9)
int r1 = o.C17052tZT.jNh.ThemeEnforcement_enforceTextAppearance
r2 = 0
boolean r1 = r0.getBoolean(r1, r2)
if (r1 != 0) goto L13
r0.recycle()
return
L13:
r1 = 1
r3 = -1
if (r10 == 0) goto L35
int r4 = r10.length
if (r4 == 0) goto L35
android.content.res.TypedArray r5 = r5.obtainStyledAttributes(r6, r7, r8, r9)
int r6 = r10.length
r7 = r2
L20:
if (r7 >= r6) goto L31
r8 = r10[r7]
int r8 = r5.getResourceId(r8, r3)
if (r8 != r3) goto L2e
r5.recycle()
goto L3e
L2e:
int r7 = r7 + 1
goto L20
L31:
r5.recycle()
goto L3d
L35:
int r5 = o.C17052tZT.jNh.ThemeEnforcement_android_textAppearance
int r5 = r0.getResourceId(r5, r3)
if (r5 == r3) goto L3e
L3d:
r2 = r1
L3e:
r0.recycle()
if (r2 == 0) goto L44
return
L44:
java.lang.IllegalArgumentException r5 = new java.lang.IllegalArgumentException
java.lang.String r6 = "This component requires that you specify a valid TextAppearance attribute. Update your app theme to inherit from Theme.MaterialComponents (or a descendant)."
r5.<init>(r6)
throw r5
*/
throw new UnsupportedOperationException("Method not decompiled: o.uqW.Kc_(android.content.Context, android.util.AttributeSet, int[], int, int, int[]):void");
}
private static boolean c(Context context, int[] iArr) {
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(iArr);
for (int i = 0; i < iArr.length; i++) {
if (!obtainStyledAttributes.hasValue(i)) {
obtainStyledAttributes.recycle();
return false;
}
}
obtainStyledAttributes.recycle();
return true;
}
public static void b(Context context, int[] iArr, String str) {
if (c(context, iArr)) {
return;
}
StringBuilder sb = new StringBuilder("The style on this component requires your app theme to be ");
sb.append(str);
sb.append(" (or a descendant).");
throw new IllegalArgumentException(sb.toString());
}
}