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

459 lines
16 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package o;
import android.content.Context;
import android.content.ContextWrapper;
import android.content.res.TypedArray;
import android.os.Build;
import android.util.AttributeSet;
import android.view.InflateException;
import android.view.View;
import androidx.appcompat.widget.AppCompatAutoCompleteTextView;
import androidx.appcompat.widget.AppCompatButton;
import androidx.appcompat.widget.AppCompatCheckBox;
import androidx.appcompat.widget.AppCompatCheckedTextView;
import androidx.appcompat.widget.AppCompatEditText;
import androidx.appcompat.widget.AppCompatImageButton;
import androidx.appcompat.widget.AppCompatImageView;
import androidx.appcompat.widget.AppCompatMultiAutoCompleteTextView;
import androidx.appcompat.widget.AppCompatRadioButton;
import androidx.appcompat.widget.AppCompatRatingBar;
import androidx.appcompat.widget.AppCompatSeekBar;
import androidx.appcompat.widget.AppCompatSpinner;
import androidx.appcompat.widget.AppCompatTextView;
import androidx.appcompat.widget.AppCompatToggleButton;
import androidx.core.view.ViewCompat;
import com.google.android.gms.analytics.ecommerce.Promotion;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import o.SYO;
import org.simpleframework.xml.strategy.Name;
/* loaded from: classes.dex */
public class NOK {
private final Object[] g = new Object[2];
private static final Class<?>[] e = {Context.class, AttributeSet.class};
private static final int[] h = {android.R.attr.onClick};
private static final int[] b = {android.R.attr.accessibilityHeading};
private static final int[] a = {android.R.attr.accessibilityPaneTitle};
private static final int[] f = {android.R.attr.screenReaderFocusable};
private static final String[] d = {"android.widget.", "android.view.", "android.webkit."};
private static final DFj<String, Constructor<? extends View>> c = new DFj<>();
protected View dB_(Context context, String str, AttributeSet attributeSet) {
return null;
}
/* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
public final View dC_(View view, String str, Context context, AttributeSet attributeSet, boolean z, boolean z2, boolean z3, boolean z4) {
char c2;
View dw_;
Context context2 = (!z || view == null) ? context : view.getContext();
if (z2 || z3) {
context2 = dm_(context2, attributeSet, z2, z3);
}
if (z4) {
context2 = ZzE.b(context2);
}
str.hashCode();
switch (str.hashCode()) {
case -1946472170:
if (str.equals("RatingBar")) {
c2 = 0;
break;
}
c2 = 65535;
break;
case -1455429095:
if (str.equals("CheckedTextView")) {
c2 = 1;
break;
}
c2 = 65535;
break;
case -1346021293:
if (str.equals("MultiAutoCompleteTextView")) {
c2 = 2;
break;
}
c2 = 65535;
break;
case -938935918:
if (str.equals("TextView")) {
c2 = 3;
break;
}
c2 = 65535;
break;
case -937446323:
if (str.equals("ImageButton")) {
c2 = 4;
break;
}
c2 = 65535;
break;
case -658531749:
if (str.equals("SeekBar")) {
c2 = 5;
break;
}
c2 = 65535;
break;
case -339785223:
if (str.equals("Spinner")) {
c2 = 6;
break;
}
c2 = 65535;
break;
case 776382189:
if (str.equals("RadioButton")) {
c2 = 7;
break;
}
c2 = 65535;
break;
case 799298502:
if (str.equals("ToggleButton")) {
c2 = '\b';
break;
}
c2 = 65535;
break;
case 1125864064:
if (str.equals("ImageView")) {
c2 = '\t';
break;
}
c2 = 65535;
break;
case 1413872058:
if (str.equals("AutoCompleteTextView")) {
c2 = '\n';
break;
}
c2 = 65535;
break;
case 1601505219:
if (str.equals("CheckBox")) {
c2 = 11;
break;
}
c2 = 65535;
break;
case 1666676343:
if (str.equals("EditText")) {
c2 = '\f';
break;
}
c2 = 65535;
break;
case 2001146706:
if (str.equals("Button")) {
c2 = '\r';
break;
}
c2 = 65535;
break;
default:
c2 = 65535;
break;
}
switch (c2) {
case 0:
dw_ = dw_(context2, attributeSet);
d(dw_, str);
break;
case 1:
dw_ = dq_(context2, attributeSet);
d(dw_, str);
break;
case 2:
dw_ = du_(context2, attributeSet);
d(dw_, str);
break;
case 3:
dw_ = MO_(context2, attributeSet);
d(dw_, str);
break;
case 4:
dw_ = ds_(context2, attributeSet);
d(dw_, str);
break;
case 5:
dw_ = dx_(context2, attributeSet);
d(dw_, str);
break;
case 6:
dw_ = dy_(context2, attributeSet);
d(dw_, str);
break;
case 7:
dw_ = MN_(context2, attributeSet);
d(dw_, str);
break;
case '\b':
dw_ = dA_(context2, attributeSet);
d(dw_, str);
break;
case '\t':
dw_ = dt_(context2, attributeSet);
d(dw_, str);
break;
case '\n':
dw_ = MK_(context2, attributeSet);
d(dw_, str);
break;
case 11:
dw_ = MM_(context2, attributeSet);
d(dw_, str);
break;
case '\f':
dw_ = dr_(context2, attributeSet);
d(dw_, str);
break;
case '\r':
dw_ = ML_(context2, attributeSet);
d(dw_, str);
break;
default:
dw_ = dB_(context2, str, attributeSet);
break;
}
if (dw_ == null && context != context2) {
dw_ = dl_(context2, str, attributeSet);
}
if (dw_ != null) {
dk_(dw_, attributeSet);
dj_(context2, dw_, attributeSet);
}
return dw_;
}
protected AppCompatTextView MO_(Context context, AttributeSet attributeSet) {
return new AppCompatTextView(context, attributeSet);
}
protected AppCompatImageView dt_(Context context, AttributeSet attributeSet) {
return new AppCompatImageView(context, attributeSet);
}
protected AppCompatButton ML_(Context context, AttributeSet attributeSet) {
return new AppCompatButton(context, attributeSet);
}
protected AppCompatEditText dr_(Context context, AttributeSet attributeSet) {
return new AppCompatEditText(context, attributeSet);
}
protected AppCompatSpinner dy_(Context context, AttributeSet attributeSet) {
return new AppCompatSpinner(context, attributeSet);
}
protected AppCompatImageButton ds_(Context context, AttributeSet attributeSet) {
return new AppCompatImageButton(context, attributeSet);
}
protected AppCompatCheckBox MM_(Context context, AttributeSet attributeSet) {
return new AppCompatCheckBox(context, attributeSet);
}
protected AppCompatRadioButton MN_(Context context, AttributeSet attributeSet) {
return new AppCompatRadioButton(context, attributeSet);
}
protected AppCompatCheckedTextView dq_(Context context, AttributeSet attributeSet) {
return new AppCompatCheckedTextView(context, attributeSet);
}
protected AppCompatAutoCompleteTextView MK_(Context context, AttributeSet attributeSet) {
return new AppCompatAutoCompleteTextView(context, attributeSet);
}
protected AppCompatMultiAutoCompleteTextView du_(Context context, AttributeSet attributeSet) {
return new AppCompatMultiAutoCompleteTextView(context, attributeSet);
}
protected AppCompatRatingBar dw_(Context context, AttributeSet attributeSet) {
return new AppCompatRatingBar(context, attributeSet);
}
protected AppCompatSeekBar dx_(Context context, AttributeSet attributeSet) {
return new AppCompatSeekBar(context, attributeSet);
}
protected AppCompatToggleButton dA_(Context context, AttributeSet attributeSet) {
return new AppCompatToggleButton(context, attributeSet);
}
private void d(View view, String str) {
if (view != null) {
return;
}
StringBuilder sb = new StringBuilder();
sb.append(getClass().getName());
sb.append(" asked to inflate view for <");
sb.append(str);
sb.append(">, but returned null");
throw new IllegalStateException(sb.toString());
}
private View dl_(Context context, String str, AttributeSet attributeSet) {
if (str.equals(Promotion.ACTION_VIEW)) {
str = attributeSet.getAttributeValue(null, Name.LABEL);
}
try {
Object[] objArr = this.g;
objArr[0] = context;
objArr[1] = attributeSet;
if (-1 != str.indexOf(46)) {
return d(context, str, null);
}
int i = 0;
while (true) {
String[] strArr = d;
if (i >= strArr.length) {
return null;
}
View d2 = d(context, str, strArr[i]);
if (d2 != null) {
return d2;
}
i++;
}
} catch (Exception unused) {
return null;
} finally {
Object[] objArr2 = this.g;
objArr2[0] = null;
objArr2[1] = null;
}
}
private void dk_(View view, AttributeSet attributeSet) {
Context context = view.getContext();
if ((context instanceof ContextWrapper) && ViewCompat.B(view)) {
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, h);
String string = obtainStyledAttributes.getString(0);
if (string != null) {
view.setOnClickListener(new HBt(view, string));
}
obtainStyledAttributes.recycle();
}
}
private View d(Context context, String str, String str2) throws ClassNotFoundException, InflateException {
String obj;
DFj<String, Constructor<? extends View>> dFj = c;
Constructor<? extends View> constructor = dFj.get(str);
if (constructor == null) {
if (str2 != null) {
try {
StringBuilder sb = new StringBuilder();
sb.append(str2);
sb.append(str);
obj = sb.toString();
} catch (Exception unused) {
return null;
}
} else {
obj = str;
}
constructor = Class.forName(obj, false, context.getClassLoader()).asSubclass(View.class).getConstructor(e);
dFj.put(str, constructor);
}
constructor.setAccessible(true);
return constructor.newInstance(this.g);
}
private static Context dm_(Context context, AttributeSet attributeSet, boolean z, boolean z2) {
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, SYO.ZqN.View, 0, 0);
int resourceId = z ? obtainStyledAttributes.getResourceId(SYO.ZqN.View_android_theme, 0) : 0;
if (z2 && resourceId == 0) {
resourceId = obtainStyledAttributes.getResourceId(SYO.ZqN.View_theme, 0);
}
obtainStyledAttributes.recycle();
return resourceId != 0 ? ((context instanceof mhG) && ((mhG) context).e == resourceId) ? context : new mhG(context, resourceId) : context;
}
private void dj_(Context context, View view, AttributeSet attributeSet) {
if (Build.VERSION.SDK_INT > 28) {
return;
}
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, b);
if (obtainStyledAttributes.hasValue(0)) {
ViewCompat.c(view, obtainStyledAttributes.getBoolean(0, false));
}
obtainStyledAttributes.recycle();
TypedArray obtainStyledAttributes2 = context.obtainStyledAttributes(attributeSet, a);
if (obtainStyledAttributes2.hasValue(0)) {
ViewCompat.d(view, obtainStyledAttributes2.getString(0));
}
obtainStyledAttributes2.recycle();
TypedArray obtainStyledAttributes3 = context.obtainStyledAttributes(attributeSet, f);
if (obtainStyledAttributes3.hasValue(0)) {
ViewCompat.e(view, obtainStyledAttributes3.getBoolean(0, false));
}
obtainStyledAttributes3.recycle();
}
/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes.dex */
public static class HBt implements View.OnClickListener {
private final String a;
private Method c;
private final View d;
private Context e;
public HBt(View view, String str) {
this.d = view;
this.a = str;
}
@Override // android.view.View.OnClickListener
public void onClick(View view) {
if (this.c == null) {
b(this.d.getContext());
}
try {
this.c.invoke(this.e, view);
} catch (IllegalAccessException e) {
throw new IllegalStateException("Could not execute non-public method for android:onClick", e);
} catch (InvocationTargetException e2) {
throw new IllegalStateException("Could not execute method for android:onClick", e2);
}
}
private void b(Context context) {
String obj;
Method method;
while (context != null) {
try {
if (!context.isRestricted() && (method = context.getClass().getMethod(this.a, View.class)) != null) {
this.c = method;
this.e = context;
return;
}
} catch (NoSuchMethodException unused) {
}
context = context instanceof ContextWrapper ? ((ContextWrapper) context).getBaseContext() : null;
}
int id = this.d.getId();
if (id == -1) {
obj = "";
} else {
StringBuilder sb = new StringBuilder(" with id '");
sb.append(this.d.getContext().getResources().getResourceEntryName(id));
sb.append("'");
obj = sb.toString();
}
StringBuilder sb2 = new StringBuilder("Could not find method ");
sb2.append(this.a);
sb2.append("(View) in a parent or ancestor Context for android:onClick attribute defined on view ");
sb2.append(this.d.getClass());
sb2.append(obj);
throw new IllegalStateException(sb2.toString());
}
}
}