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

271 lines
8.5 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package o;
import android.content.Context;
import android.graphics.Typeface;
import android.os.Handler;
import android.os.Looper;
import java.util.ArrayList;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.LinkedBlockingDeque;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import o.CLP;
/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes.dex */
public final class LOs {
private static final ExecutorService a;
private static pKi<String, Typeface> b = new pKi<>(16);
static final Object d;
static final DFj<String, ArrayList<QUU<HBt>>> e;
static {
ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(0, 1, 10000L, TimeUnit.MILLISECONDS, new LinkedBlockingDeque(), new CLP.LWm("fonts-androidx"));
threadPoolExecutor.allowCoreThreadTimeOut(true);
a = threadPoolExecutor;
d = new Object();
e = new DFj<>();
}
/* JADX WARN: Removed duplicated region for block: B:15:0x004a */
/* JADX WARN: Removed duplicated region for block: B:17:0x0050 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
static o.LOs.HBt b(java.lang.String r8, android.content.Context r9, o.WXG r10, int r11) {
/*
o.pKi<java.lang.String, android.graphics.Typeface> r0 = o.LOs.b
java.lang.Object r1 = r0.get(r8)
android.graphics.Typeface r1 = (android.graphics.Typeface) r1
if (r1 == 0) goto L10
o.LOs$HBt r8 = new o.LOs$HBt
r8.<init>(r1)
return r8
L10:
r1 = 0
o.ubj$IeS r10 = o.TWJ.qx_(r9, r10, r1) // Catch: android.content.pm.PackageManager.NameNotFoundException -> L69
int r2 = r10.b()
r3 = -3
r4 = 1
if (r2 == 0) goto L27
int r2 = r10.b()
if (r2 == r4) goto L25
L23:
r2 = r3
goto L48
L25:
r2 = -2
goto L48
L27:
o.ubj$HBt[] r2 = r10.e()
if (r2 == 0) goto L47
int r5 = r2.length
if (r5 != 0) goto L31
goto L47
L31:
int r4 = r2.length
r5 = 0
r6 = r5
L34:
if (r6 >= r4) goto L46
r7 = r2[r6]
int r7 = r7.a()
if (r7 == 0) goto L43
if (r7 >= 0) goto L41
goto L23
L41:
r2 = r7
goto L48
L43:
int r6 = r6 + 1
goto L34
L46:
r4 = r5
L47:
r2 = r4
L48:
if (r2 == 0) goto L50
o.LOs$HBt r8 = new o.LOs$HBt
r8.<init>(r2)
return r8
L50:
o.ubj$HBt[] r10 = r10.e()
android.graphics.Typeface r9 = o.TaO.oK_(r9, r1, r10, r11)
if (r9 == 0) goto L63
r0.put(r8, r9)
o.LOs$HBt r8 = new o.LOs$HBt
r8.<init>(r9)
return r8
L63:
o.LOs$HBt r8 = new o.LOs$HBt
r8.<init>(r3)
return r8
L69:
o.LOs$HBt r8 = new o.LOs$HBt
r9 = -1
r8.<init>(r9)
return r8
*/
throw new UnsupportedOperationException("Method not decompiled: o.LOs.b(java.lang.String, android.content.Context, o.WXG, int):o.LOs$HBt");
}
/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes.dex */
public static final class HBt {
final Typeface a;
final int d;
HBt(int i) {
this.a = null;
this.d = i;
}
HBt(Typeface typeface) {
this.a = typeface;
this.d = 0;
}
}
/* JADX INFO: Access modifiers changed from: package-private */
public static Typeface qA_(Context context, WXG wxg, int i, LBl lBl) {
Handler handler;
StringBuilder sb = new StringBuilder();
sb.append(wxg.a);
sb.append("-");
sb.append(i);
String obj = sb.toString();
Typeface typeface = b.get(obj);
if (typeface != null) {
lBl.c(new HBt(typeface));
return typeface;
}
QUU<HBt> quu = new QUU<HBt>(lBl) { // from class: o.LOs.3
final LBl d;
{
this.d = lBl;
}
@Override // o.QUU
public final /* synthetic */ void accept(HBt hBt) {
HBt hBt2 = hBt;
if (hBt2 == null) {
hBt2 = new HBt(-3);
}
this.d.c(hBt2);
}
};
synchronized (d) {
DFj<String, ArrayList<QUU<HBt>>> dFj = e;
ArrayList<QUU<HBt>> arrayList = dFj.get(obj);
if (arrayList != null) {
arrayList.add(quu);
return null;
}
ArrayList<QUU<HBt>> arrayList2 = new ArrayList<>();
arrayList2.add(quu);
dFj.put(obj, arrayList2);
Callable<HBt> callable = new Callable<HBt>(obj, context, wxg, i) { // from class: o.LOs.1
final WXG a;
final int b;
final String d;
final Context e;
{
this.d = obj;
this.e = context;
this.a = wxg;
this.b = i;
}
/* JADX INFO: Access modifiers changed from: private */
@Override // java.util.concurrent.Callable
/* renamed from: a, reason: merged with bridge method [inline-methods] */
public HBt call() {
try {
return LOs.b(this.d, this.e, this.a, this.b);
} catch (Throwable unused) {
return new HBt(-3);
}
}
};
ExecutorService executorService = a;
QUU<HBt> quu2 = new QUU<HBt>(obj) { // from class: o.LOs.2
final String b;
{
this.b = obj;
}
@Override // o.QUU
public final /* synthetic */ void accept(HBt hBt) {
HBt hBt2 = hBt;
synchronized (LOs.d) {
ArrayList<QUU<HBt>> arrayList3 = LOs.e.get(this.b);
if (arrayList3 == null) {
return;
}
LOs.e.remove(this.b);
for (int i2 = 0; i2 < arrayList3.size(); i2++) {
arrayList3.get(i2).accept(hBt2);
}
}
}
};
if (Looper.myLooper() == null) {
handler = new Handler(Looper.getMainLooper());
} else {
handler = new Handler();
}
executorService.execute(new CLP.RVV(handler, callable, quu2));
return null;
}
}
/* JADX INFO: Access modifiers changed from: package-private */
public static Typeface qB_(Context context, WXG wxg, LBl lBl, int i, int i2) {
StringBuilder sb = new StringBuilder();
sb.append(wxg.a);
sb.append("-");
sb.append(i);
String obj = sb.toString();
Typeface typeface = b.get(obj);
if (typeface != null) {
lBl.c(new HBt(typeface));
return typeface;
}
if (i2 == -1) {
HBt b2 = b(obj, context, wxg, i);
lBl.c(b2);
return b2.a;
}
try {
HBt hBt = (HBt) CLP.b(a, new Callable<HBt>(obj, context, wxg, i) { // from class: o.LOs.5
final String a;
final Context c;
final int d;
final WXG e;
{
this.a = obj;
this.c = context;
this.e = wxg;
this.d = i;
}
@Override // java.util.concurrent.Callable
public final /* synthetic */ HBt call() throws Exception {
return LOs.b(this.a, this.c, this.e, this.d);
}
}, i2);
lBl.c(hBt);
return hBt.a;
} catch (InterruptedException unused) {
lBl.c(new HBt(-3));
return null;
}
}
}