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

495 lines
16 KiB
Java
Raw Permalink 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.Resources;
import android.graphics.PorterDuff;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.LocaleList;
import android.util.TypedValue;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputConnection;
import android.widget.TextView;
import androidx.core.view.ViewCompat;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import java.lang.ref.WeakReference;
import o.SYO;
import o.kVs;
/* loaded from: classes.dex */
public class Yoi {
private boolean a;
private C16821rXR b;
private final VBp c;
private C16821rXR d;
private C16821rXR e;
private C16821rXR f;
private C16821rXR g;
private Typeface h;
private C16821rXR i;
private C16821rXR j;
private final TextView n;
private int m = 0;
private int k = -1;
public Yoi(TextView textView) {
this.n = textView;
this.c = new VBp(textView);
}
/* JADX WARN: Removed duplicated region for block: B:101:0x02d4 */
/* JADX WARN: Removed duplicated region for block: B:103:0x02db */
/* JADX WARN: Removed duplicated region for block: B:105:0x02e2 */
/* JADX WARN: Removed duplicated region for block: B:108:? A[RETURN, SYNTHETIC] */
/* JADX WARN: Removed duplicated region for block: B:109:0x027f */
/* JADX WARN: Removed duplicated region for block: B:110:0x026e */
/* JADX WARN: Removed duplicated region for block: B:111:0x025d */
/* JADX WARN: Removed duplicated region for block: B:112:0x024c */
/* JADX WARN: Removed duplicated region for block: B:113:0x023b */
/* JADX WARN: Removed duplicated region for block: B:114:0x022a */
/* JADX WARN: Removed duplicated region for block: B:116:0x0124 */
/* JADX WARN: Removed duplicated region for block: B:117:0x0110 */
/* JADX WARN: Removed duplicated region for block: B:28:0x0107 */
/* JADX WARN: Removed duplicated region for block: B:31:0x011b */
/* JADX WARN: Removed duplicated region for block: B:40:0x015b */
/* JADX WARN: Removed duplicated region for block: B:43:0x016d */
/* JADX WARN: Removed duplicated region for block: B:46:0x017b */
/* JADX WARN: Removed duplicated region for block: B:57:0x01a8 */
/* JADX WARN: Removed duplicated region for block: B:62:0x01bb */
/* JADX WARN: Removed duplicated region for block: B:64:0x01c2 */
/* JADX WARN: Removed duplicated region for block: B:71:0x01e5 */
/* JADX WARN: Removed duplicated region for block: B:77:0x0224 */
/* JADX WARN: Removed duplicated region for block: B:80:0x0235 */
/* JADX WARN: Removed duplicated region for block: B:83:0x0246 */
/* JADX WARN: Removed duplicated region for block: B:86:0x0257 */
/* JADX WARN: Removed duplicated region for block: B:89:0x0268 */
/* JADX WARN: Removed duplicated region for block: B:92:0x0279 */
/* JADX WARN: Removed duplicated region for block: B:95:0x028f */
/* JADX WARN: Removed duplicated region for block: B:98:0x02a4 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public void he_(android.util.AttributeSet r17, int r18) {
/*
Method dump skipped, instructions count: 744
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: o.Yoi.he_(android.util.AttributeSet, int):void");
}
private void b(Context context, C0683McA c0683McA) {
int i;
String string;
this.m = c0683McA.d.getInt(SYO.ZqN.TextAppearance_android_textStyle, this.m);
if (Build.VERSION.SDK_INT >= 28) {
int i2 = c0683McA.d.getInt(SYO.ZqN.TextAppearance_android_textFontWeight, -1);
this.k = i2;
if (i2 != -1) {
this.m &= 2;
}
}
if (!c0683McA.d.hasValue(SYO.ZqN.TextAppearance_android_fontFamily)) {
if (!c0683McA.d.hasValue(SYO.ZqN.TextAppearance_fontFamily)) {
if (c0683McA.d.hasValue(SYO.ZqN.TextAppearance_android_typeface)) {
this.a = false;
int i3 = c0683McA.d.getInt(SYO.ZqN.TextAppearance_android_typeface, 1);
if (i3 == 1) {
this.h = Typeface.SANS_SERIF;
return;
} else if (i3 == 2) {
this.h = Typeface.SERIF;
return;
} else {
if (i3 == 3) {
this.h = Typeface.MONOSPACE;
return;
}
return;
}
}
return;
}
}
Typeface typeface = null;
this.h = null;
if (c0683McA.d.hasValue(SYO.ZqN.TextAppearance_fontFamily)) {
i = SYO.ZqN.TextAppearance_fontFamily;
} else {
i = SYO.ZqN.TextAppearance_android_fontFamily;
}
int i4 = this.k;
int i5 = this.m;
if (!context.isRestricted()) {
kVs.LWm lWm = new kVs.LWm(this, i4, i5, new WeakReference(this.n)) { // from class: o.Yoi.1
final int a;
final Yoi b;
final int d;
final WeakReference e;
@Override // o.kVs.LWm
/* renamed from: e */
public void b(int i6) {
}
{
this.b = this;
this.d = i4;
this.a = i5;
this.e = r4;
}
@Override // o.kVs.LWm
/* renamed from: KC_ */
public void oq_(Typeface typeface2) {
int i6;
if (Build.VERSION.SDK_INT >= 28 && (i6 = this.d) != -1) {
typeface2 = HBt.hs_(typeface2, i6, (this.a & 2) != 0);
}
this.b.hf_(this.e, typeface2);
}
};
try {
int i6 = this.m;
int resourceId = c0683McA.d.getResourceId(i, 0);
if (resourceId != 0) {
if (c0683McA.a == null) {
c0683McA.a = new TypedValue();
}
typeface = kVs.oc_(c0683McA.b, resourceId, c0683McA.a, i6, lWm);
}
if (typeface != null) {
if (Build.VERSION.SDK_INT < 28 || this.k == -1) {
this.h = typeface;
} else {
this.h = HBt.hs_(Typeface.create(typeface, 0), this.k, (this.m & 2) != 0);
}
}
this.a = this.h == null;
} catch (Resources.NotFoundException | UnsupportedOperationException unused) {
}
}
if (this.h != null || (string = c0683McA.d.getString(i)) == null) {
return;
}
if (Build.VERSION.SDK_INT >= 28 && this.k != -1) {
this.h = HBt.hs_(Typeface.create(string, 0), this.k, (this.m & 2) != 0);
} else {
this.h = Typeface.create(string, this.m);
}
}
void hf_(WeakReference<TextView> weakReference, Typeface typeface) {
if (this.a) {
this.h = typeface;
TextView textView = weakReference.get();
if (textView != null) {
if (ViewCompat.H(textView)) {
textView.post(new Runnable(this, textView, typeface, this.m) { // from class: o.Yoi.5
final Yoi a;
final TextView b;
final Typeface c;
final int e;
{
this.a = this;
this.b = textView;
this.c = typeface;
this.e = r4;
}
@Override // java.lang.Runnable
public void run() {
this.b.setTypeface(this.c, this.e);
}
});
} else {
textView.setTypeface(typeface, this.m);
}
}
}
}
public void d(Context context, int i) {
C0683McA c0683McA = new C0683McA(context, context.obtainStyledAttributes(i, SYO.ZqN.TextAppearance));
if (c0683McA.d.hasValue(SYO.ZqN.TextAppearance_textAllCaps)) {
a(c0683McA.d.getBoolean(SYO.ZqN.TextAppearance_textAllCaps, false));
}
if (c0683McA.d.hasValue(SYO.ZqN.TextAppearance_android_textSize)) {
if (c0683McA.d.getDimensionPixelSize(SYO.ZqN.TextAppearance_android_textSize, -1) == 0) {
this.n.setTextSize(0, BitmapDescriptorFactory.HUE_RED);
}
}
b(context, c0683McA);
if (c0683McA.d.hasValue(SYO.ZqN.TextAppearance_fontVariationSettings)) {
String string = c0683McA.d.getString(SYO.ZqN.TextAppearance_fontVariationSettings);
if (string != null) {
LWm.hr_(this.n, string);
}
}
c0683McA.d.recycle();
Typeface typeface = this.h;
if (typeface != null) {
this.n.setTypeface(typeface, this.m);
}
}
public void a(boolean z) {
this.n.setAllCaps(z);
}
public void l() {
a();
}
public void a() {
if (this.d != null || this.g != null || this.j != null || this.b != null) {
Drawable[] compoundDrawables = this.n.getCompoundDrawables();
ha_(compoundDrawables[0], this.d);
ha_(compoundDrawables[1], this.g);
ha_(compoundDrawables[2], this.j);
ha_(compoundDrawables[3], this.b);
}
if (this.f == null && this.e == null) {
return;
}
Drawable[] hk_ = RVV.hk_(this.n);
ha_(hk_[0], this.f);
ha_(hk_[2], this.e);
}
private void ha_(Drawable drawable, C16821rXR c16821rXR) {
if (drawable == null || c16821rXR == null) {
return;
}
RXZ.fN_(drawable, c16821rXR, this.n.getDrawableState());
}
private static C16821rXR a(Context context, RXZ rxz, int i) {
ColorStateList fQ_ = rxz.fQ_(context, i);
if (fQ_ == null) {
return null;
}
C16821rXR c16821rXR = new C16821rXR();
c16821rXR.b = true;
c16821rXR.c = fQ_;
return c16821rXR;
}
public void b(boolean z, int i, int i2, int i3, int i4) {
if (mxt.a) {
return;
}
b();
}
public void e(int i, float f) {
if (mxt.a || i()) {
return;
}
b(i, f);
}
public void b() {
this.c.c();
}
public boolean i() {
return this.c.i();
}
private void b(int i, float f) {
this.c.c(i, f);
}
public void c(int i) {
this.c.a(i);
}
public void b(int i, int i2, int i3, int i4) throws IllegalArgumentException {
this.c.d(i, i2, i3, i4);
}
public void c(int[] iArr, int i) throws IllegalArgumentException {
this.c.e(iArr, i);
}
public int j() {
return this.c.f();
}
public int d() {
return this.c.b();
}
public int e() {
return this.c.e();
}
public int c() {
return this.c.d();
}
public int[] f() {
return this.c.a();
}
public ColorStateList hc_() {
C16821rXR c16821rXR = this.i;
if (c16821rXR != null) {
return c16821rXR.c;
}
return null;
}
public void hh_(ColorStateList colorStateList) {
if (this.i == null) {
this.i = new C16821rXR();
}
this.i.c = colorStateList;
this.i.b = colorStateList != null;
o();
}
public PorterDuff.Mode hd_() {
C16821rXR c16821rXR = this.i;
if (c16821rXR != null) {
return c16821rXR.d;
}
return null;
}
public void hi_(PorterDuff.Mode mode) {
if (this.i == null) {
this.i = new C16821rXR();
}
this.i.d = mode;
this.i.a = mode != null;
o();
}
private void hb_(Drawable drawable, Drawable drawable2, Drawable drawable3, Drawable drawable4, Drawable drawable5, Drawable drawable6) {
if (drawable5 != null || drawable6 != null) {
Drawable[] hk_ = RVV.hk_(this.n);
TextView textView = this.n;
if (drawable5 == null) {
drawable5 = hk_[0];
}
if (drawable2 == null) {
drawable2 = hk_[1];
}
if (drawable6 == null) {
drawable6 = hk_[2];
}
if (drawable4 == null) {
drawable4 = hk_[3];
}
RVV.hl_(textView, drawable5, drawable2, drawable6, drawable4);
return;
}
if (drawable == null && drawable2 == null && drawable3 == null && drawable4 == null) {
return;
}
Drawable[] hk_2 = RVV.hk_(this.n);
Drawable drawable7 = hk_2[0];
if (drawable7 != null || hk_2[2] != null) {
TextView textView2 = this.n;
if (drawable2 == null) {
drawable2 = hk_2[1];
}
Drawable drawable8 = hk_2[2];
if (drawable4 == null) {
drawable4 = hk_2[3];
}
RVV.hl_(textView2, drawable7, drawable2, drawable8, drawable4);
return;
}
Drawable[] compoundDrawables = this.n.getCompoundDrawables();
TextView textView3 = this.n;
if (drawable == null) {
drawable = compoundDrawables[0];
}
if (drawable2 == null) {
drawable2 = compoundDrawables[1];
}
if (drawable3 == null) {
drawable3 = compoundDrawables[2];
}
if (drawable4 == null) {
drawable4 = compoundDrawables[3];
}
textView3.setCompoundDrawablesWithIntrinsicBounds(drawable, drawable2, drawable3, drawable4);
}
public void hg_(TextView textView, InputConnection inputConnection, EditorInfo editorInfo) {
if (Build.VERSION.SDK_INT >= 30 || inputConnection == null) {
return;
}
C0208BiK.uA_(editorInfo, textView.getText());
}
/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes.dex */
public static class LWm {
static boolean hr_(TextView textView, String str) {
return textView.setFontVariationSettings(str);
}
static int ho_(TextView textView) {
return textView.getAutoSizeStepGranularity();
}
static void hp_(TextView textView, int i, int i2, int i3, int i4) {
textView.setAutoSizeTextTypeUniformWithConfiguration(i, i2, i3, i4);
}
static void hq_(TextView textView, int[] iArr, int i) {
textView.setAutoSizeTextTypeUniformWithPresetSizes(iArr, i);
}
}
/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes.dex */
public static class Sts {
static void hn_(TextView textView, LocaleList localeList) {
textView.setTextLocales(localeList);
}
static LocaleList hm_(String str) {
return LocaleList.forLanguageTags(str);
}
}
/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes.dex */
public static class RVV {
static void hl_(TextView textView, Drawable drawable, Drawable drawable2, Drawable drawable3, Drawable drawable4) {
textView.setCompoundDrawablesRelativeWithIntrinsicBounds(drawable, drawable2, drawable3, drawable4);
}
static Drawable[] hk_(TextView textView) {
return textView.getCompoundDrawablesRelative();
}
}
/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes.dex */
public static class HBt {
static Typeface hs_(Typeface typeface, int i, boolean z) {
return Typeface.create(typeface, i, z);
}
}
private void o() {
C16821rXR c16821rXR = this.i;
this.d = c16821rXR;
this.g = c16821rXR;
this.j = c16821rXR;
this.b = c16821rXR;
this.f = c16821rXR;
this.e = c16821rXR;
}
}