1043 lines
37 KiB
Java
1043 lines
37 KiB
Java
|
package com.facetec.sdk;
|
||
|
|
||
|
import com.facetec.sdk.ls;
|
||
|
import com.facetec.sdk.lv;
|
||
|
import com.google.common.base.Ascii;
|
||
|
import java.io.Closeable;
|
||
|
import java.io.EOFException;
|
||
|
import java.io.IOException;
|
||
|
import java.net.Socket;
|
||
|
import java.util.LinkedHashMap;
|
||
|
import java.util.LinkedHashSet;
|
||
|
import java.util.List;
|
||
|
import java.util.Map;
|
||
|
import java.util.Set;
|
||
|
import java.util.concurrent.ExecutorService;
|
||
|
import java.util.concurrent.LinkedBlockingQueue;
|
||
|
import java.util.concurrent.RejectedExecutionException;
|
||
|
import java.util.concurrent.ScheduledExecutorService;
|
||
|
import java.util.concurrent.ScheduledThreadPoolExecutor;
|
||
|
import java.util.concurrent.SynchronousQueue;
|
||
|
import java.util.concurrent.ThreadPoolExecutor;
|
||
|
import java.util.concurrent.TimeUnit;
|
||
|
import java.util.logging.Level;
|
||
|
import net.sf.scuba.smartcards.ISO7816;
|
||
|
import net.sf.scuba.smartcards.ISOFileInfo;
|
||
|
import okhttp3.internal.http2.Http2Connection;
|
||
|
|
||
|
/* loaded from: classes.dex */
|
||
|
public final class lw implements Closeable {
|
||
|
private static final ExecutorService q;
|
||
|
private static boolean u;
|
||
|
private static final int v = 0;
|
||
|
private static final byte[] x = null;
|
||
|
final boolean a;
|
||
|
int b;
|
||
|
final a d;
|
||
|
final String e;
|
||
|
int f;
|
||
|
final ma g;
|
||
|
long h;
|
||
|
boolean i;
|
||
|
boolean j;
|
||
|
final mb k;
|
||
|
public b l;
|
||
|
boolean n;
|
||
|
|
||
|
/* renamed from: o, reason: collision with root package name */
|
||
|
public final lz f6456o;
|
||
|
private final ExecutorService p;
|
||
|
final Set<Integer> r;
|
||
|
private final ScheduledExecutorService s;
|
||
|
private Socket w;
|
||
|
final Map<Integer, ls> c = new LinkedHashMap();
|
||
|
private long t = 0;
|
||
|
public mb m = new mb();
|
||
|
|
||
|
/* loaded from: classes.dex */
|
||
|
public static abstract class a {
|
||
|
public static final a l = new a() { // from class: com.facetec.sdk.lw.a.5
|
||
|
@Override // com.facetec.sdk.lw.a
|
||
|
public final void e(ls lsVar) throws IOException {
|
||
|
lsVar.e(lo.REFUSED_STREAM);
|
||
|
}
|
||
|
};
|
||
|
|
||
|
public void c(lw lwVar) {
|
||
|
}
|
||
|
|
||
|
public abstract void e(ls lsVar) throws IOException;
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes.dex */
|
||
|
public static final class c {
|
||
|
public mr a;
|
||
|
public mv b;
|
||
|
public String d;
|
||
|
public Socket e;
|
||
|
public int j;
|
||
|
public a c = a.l;
|
||
|
ma i = ma.e;
|
||
|
boolean g = true;
|
||
|
}
|
||
|
|
||
|
static boolean b(int i) {
|
||
|
return i != 0 && (i & 1) == 0;
|
||
|
}
|
||
|
|
||
|
private static void y(byte b2, short s, int i, Object[] objArr) {
|
||
|
byte[] bArr = x;
|
||
|
int i2 = 16 - (s * 12);
|
||
|
int i3 = b2 * 3;
|
||
|
int i4 = 106 - (i * 7);
|
||
|
byte[] bArr2 = new byte[i3 + 13];
|
||
|
int i5 = i3 + 12;
|
||
|
int i6 = -1;
|
||
|
if (bArr == null) {
|
||
|
i4 = i4 + (-i5) + 2;
|
||
|
i2++;
|
||
|
}
|
||
|
while (true) {
|
||
|
i6++;
|
||
|
bArr2[i6] = (byte) i4;
|
||
|
if (i6 == i5) {
|
||
|
objArr[0] = new String(bArr2, 0);
|
||
|
return;
|
||
|
} else {
|
||
|
i4 = i4 + (-bArr[i2]) + 2;
|
||
|
i2++;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
static /* synthetic */ boolean e(lw lwVar) {
|
||
|
lwVar.j = false;
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
static {
|
||
|
j();
|
||
|
u = true;
|
||
|
q = new ThreadPoolExecutor(0, Integer.MAX_VALUE, 60L, TimeUnit.SECONDS, new SynchronousQueue(), km.d("OkHttp Http2Connection", true));
|
||
|
}
|
||
|
|
||
|
public lw(c cVar) {
|
||
|
mb mbVar = new mb();
|
||
|
this.k = mbVar;
|
||
|
this.n = false;
|
||
|
this.r = new LinkedHashSet();
|
||
|
this.g = cVar.i;
|
||
|
boolean z = cVar.g;
|
||
|
this.a = z;
|
||
|
this.d = cVar.c;
|
||
|
this.f = cVar.g ? 1 : 2;
|
||
|
if (cVar.g) {
|
||
|
this.f += 2;
|
||
|
}
|
||
|
if (cVar.g) {
|
||
|
this.m.c(7, Http2Connection.OKHTTP_CLIENT_WINDOW_SIZE);
|
||
|
}
|
||
|
String str = cVar.d;
|
||
|
this.e = str;
|
||
|
ScheduledThreadPoolExecutor scheduledThreadPoolExecutor = new ScheduledThreadPoolExecutor(1, km.d(km.a("OkHttp %s Writer", str), false));
|
||
|
this.s = scheduledThreadPoolExecutor;
|
||
|
if (cVar.j != 0) {
|
||
|
scheduledThreadPoolExecutor.scheduleAtFixedRate(new d(this, false, 0, 0), cVar.j, cVar.j, TimeUnit.MILLISECONDS);
|
||
|
}
|
||
|
this.p = new ThreadPoolExecutor(0, 1, 60L, TimeUnit.SECONDS, new LinkedBlockingQueue(), km.d(km.a("OkHttp %s Push Observer", str), true));
|
||
|
mbVar.c(7, 65535);
|
||
|
mbVar.c(5, 16384);
|
||
|
this.h = mbVar.c();
|
||
|
this.w = cVar.e;
|
||
|
this.f6456o = new lz(cVar.b, z);
|
||
|
this.l = new b(this, new lv(cVar.a, z));
|
||
|
}
|
||
|
|
||
|
final ls c(int i) {
|
||
|
ls lsVar;
|
||
|
synchronized (this) {
|
||
|
lsVar = this.c.get(Integer.valueOf(i));
|
||
|
}
|
||
|
return lsVar;
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public final ls d(int i) {
|
||
|
ls remove;
|
||
|
synchronized (this) {
|
||
|
remove = this.c.remove(Integer.valueOf(i));
|
||
|
notifyAll();
|
||
|
}
|
||
|
return remove;
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public final void e(long j) {
|
||
|
synchronized (this) {
|
||
|
long j2 = this.t + j;
|
||
|
this.t = j2;
|
||
|
if (j2 >= this.m.c() / 2) {
|
||
|
b(0, this.t);
|
||
|
this.t = 0L;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:21:0x0041 A[Catch: all -> 0x005f, TRY_LEAVE, TryCatch #1 {, blocks: (B:6:0x0006, B:8:0x000d, B:9:0x0012, B:11:0x0016, B:13:0x0029, B:15:0x0031, B:19:0x003b, B:21:0x0041, B:30:0x0059, B:31:0x005e), top: B:5:0x0006, outer: #0 }] */
|
||
|
/*
|
||
|
Code decompiled incorrectly, please refer to instructions dump.
|
||
|
To view partially-correct add '--show-bad-code' argument
|
||
|
*/
|
||
|
public final com.facetec.sdk.ls c(java.util.List<com.facetec.sdk.ln> r11, boolean r12) throws java.io.IOException {
|
||
|
/*
|
||
|
r10 = this;
|
||
|
r6 = r12 ^ 1
|
||
|
com.facetec.sdk.lz r7 = r10.f6456o
|
||
|
monitor-enter(r7)
|
||
|
monitor-enter(r10) // Catch: java.lang.Throwable -> L62
|
||
|
int r0 = r10.f // Catch: java.lang.Throwable -> L5f
|
||
|
r1 = 1073741823(0x3fffffff, float:1.9999999)
|
||
|
if (r0 <= r1) goto L12
|
||
|
com.facetec.sdk.lo r0 = com.facetec.sdk.lo.REFUSED_STREAM // Catch: java.lang.Throwable -> L5f
|
||
|
r10.d(r0) // Catch: java.lang.Throwable -> L5f
|
||
|
L12:
|
||
|
boolean r0 = r10.i // Catch: java.lang.Throwable -> L5f
|
||
|
if (r0 != 0) goto L59
|
||
|
int r8 = r10.f // Catch: java.lang.Throwable -> L5f
|
||
|
int r0 = r8 + 2
|
||
|
r10.f = r0 // Catch: java.lang.Throwable -> L5f
|
||
|
com.facetec.sdk.ls r9 = new com.facetec.sdk.ls // Catch: java.lang.Throwable -> L5f
|
||
|
r4 = 0
|
||
|
r5 = 0
|
||
|
r0 = r9
|
||
|
r1 = r8
|
||
|
r2 = r10
|
||
|
r3 = r6
|
||
|
r0.<init>(r1, r2, r3, r4, r5) // Catch: java.lang.Throwable -> L5f
|
||
|
if (r12 == 0) goto L3a
|
||
|
long r0 = r10.h // Catch: java.lang.Throwable -> L5f
|
||
|
r2 = 0
|
||
|
int r12 = (r0 > r2 ? 1 : (r0 == r2 ? 0 : -1))
|
||
|
if (r12 == 0) goto L3a
|
||
|
long r0 = r9.a // Catch: java.lang.Throwable -> L5f
|
||
|
int r12 = (r0 > r2 ? 1 : (r0 == r2 ? 0 : -1))
|
||
|
if (r12 != 0) goto L38
|
||
|
goto L3a
|
||
|
L38:
|
||
|
r12 = 0
|
||
|
goto L3b
|
||
|
L3a:
|
||
|
r12 = 1
|
||
|
L3b:
|
||
|
boolean r0 = r9.a() // Catch: java.lang.Throwable -> L5f
|
||
|
if (r0 == 0) goto L4a
|
||
|
java.util.Map<java.lang.Integer, com.facetec.sdk.ls> r0 = r10.c // Catch: java.lang.Throwable -> L5f
|
||
|
java.lang.Integer r1 = java.lang.Integer.valueOf(r8) // Catch: java.lang.Throwable -> L5f
|
||
|
r0.put(r1, r9) // Catch: java.lang.Throwable -> L5f
|
||
|
L4a:
|
||
|
monitor-exit(r10)
|
||
|
com.facetec.sdk.lz r0 = r10.f6456o // Catch: java.lang.Throwable -> L62
|
||
|
r0.d(r6, r8, r11) // Catch: java.lang.Throwable -> L62
|
||
|
monitor-exit(r7)
|
||
|
if (r12 == 0) goto L58
|
||
|
com.facetec.sdk.lz r11 = r10.f6456o
|
||
|
r11.c()
|
||
|
L58:
|
||
|
return r9
|
||
|
L59:
|
||
|
com.facetec.sdk.lr r11 = new com.facetec.sdk.lr // Catch: java.lang.Throwable -> L5f
|
||
|
r11.<init>() // Catch: java.lang.Throwable -> L5f
|
||
|
throw r11 // Catch: java.lang.Throwable -> L5f
|
||
|
L5f:
|
||
|
r11 = move-exception
|
||
|
monitor-exit(r10) // Catch: java.lang.Throwable -> L62
|
||
|
throw r11 // Catch: java.lang.Throwable -> L62
|
||
|
L62:
|
||
|
r11 = move-exception
|
||
|
monitor-exit(r7)
|
||
|
throw r11
|
||
|
*/
|
||
|
throw new UnsupportedOperationException("Method not decompiled: com.facetec.sdk.lw.c(java.util.List, boolean):com.facetec.sdk.ls");
|
||
|
}
|
||
|
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:18:0x0030, code lost:
|
||
|
|
||
|
throw new java.io.IOException("stream closed");
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:21:0x0031, code lost:
|
||
|
|
||
|
r4 = java.lang.Math.min((int) java.lang.Math.min(r13, r4), r9.f6456o.e);
|
||
|
r7 = r4;
|
||
|
r9.h -= r7;
|
||
|
*/
|
||
|
/*
|
||
|
Code decompiled incorrectly, please refer to instructions dump.
|
||
|
To view partially-correct add '--show-bad-code' argument
|
||
|
*/
|
||
|
public final void e(int r10, boolean r11, com.facetec.sdk.ms r12, long r13) throws java.io.IOException {
|
||
|
/*
|
||
|
r9 = this;
|
||
|
r0 = 0
|
||
|
int r2 = (r13 > r0 ? 1 : (r13 == r0 ? 0 : -1))
|
||
|
r3 = 0
|
||
|
if (r2 != 0) goto Ld
|
||
|
com.facetec.sdk.lz r13 = r9.f6456o
|
||
|
r13.b(r11, r10, r12, r3)
|
||
|
return
|
||
|
Ld:
|
||
|
int r2 = (r13 > r0 ? 1 : (r13 == r0 ? 0 : -1))
|
||
|
if (r2 <= 0) goto L9e
|
||
|
monitor-enter(r9)
|
||
|
L12:
|
||
|
r2 = 1
|
||
|
long r4 = r9.h // Catch: java.lang.Throwable -> L53 java.lang.InterruptedException -> L55
|
||
|
int r6 = (r4 > r0 ? 1 : (r4 == r0 ? 0 : -1))
|
||
|
if (r6 > 0) goto L31
|
||
|
java.util.Map<java.lang.Integer, com.facetec.sdk.ls> r4 = r9.c // Catch: java.lang.Throwable -> L53 java.lang.InterruptedException -> L55
|
||
|
java.lang.Integer r5 = java.lang.Integer.valueOf(r10) // Catch: java.lang.Throwable -> L53 java.lang.InterruptedException -> L55
|
||
|
boolean r4 = r4.containsKey(r5) // Catch: java.lang.Throwable -> L53 java.lang.InterruptedException -> L55
|
||
|
if (r4 == 0) goto L29
|
||
|
r9.wait() // Catch: java.lang.Throwable -> L53 java.lang.InterruptedException -> L55
|
||
|
goto L12
|
||
|
L29:
|
||
|
java.io.IOException r10 = new java.io.IOException // Catch: java.lang.Throwable -> L53 java.lang.InterruptedException -> L55
|
||
|
java.lang.String r11 = "stream closed"
|
||
|
r10.<init>(r11) // Catch: java.lang.Throwable -> L53 java.lang.InterruptedException -> L55
|
||
|
throw r10 // Catch: java.lang.Throwable -> L53 java.lang.InterruptedException -> L55
|
||
|
L31:
|
||
|
long r4 = java.lang.Math.min(r13, r4) // Catch: java.lang.Throwable -> L53
|
||
|
int r4 = (int) r4 // Catch: java.lang.Throwable -> L53
|
||
|
com.facetec.sdk.lz r5 = r9.f6456o // Catch: java.lang.Throwable -> L53
|
||
|
int r5 = r5.e // Catch: java.lang.Throwable -> L53
|
||
|
int r4 = java.lang.Math.min(r4, r5) // Catch: java.lang.Throwable -> L53
|
||
|
long r5 = r9.h // Catch: java.lang.Throwable -> L53
|
||
|
long r7 = (long) r4 // Catch: java.lang.Throwable -> L53
|
||
|
long r5 = r5 - r7
|
||
|
r9.h = r5 // Catch: java.lang.Throwable -> L53
|
||
|
monitor-exit(r9)
|
||
|
long r13 = r13 - r7
|
||
|
com.facetec.sdk.lz r5 = r9.f6456o
|
||
|
if (r11 == 0) goto L4e
|
||
|
int r6 = (r13 > r0 ? 1 : (r13 == r0 ? 0 : -1))
|
||
|
if (r6 == 0) goto L4f
|
||
|
L4e:
|
||
|
r2 = r3
|
||
|
L4f:
|
||
|
r5.b(r2, r10, r12, r4)
|
||
|
goto Ld
|
||
|
L53:
|
||
|
r10 = move-exception
|
||
|
goto L9c
|
||
|
L55:
|
||
|
byte[] r10 = com.facetec.sdk.lw.x // Catch: java.lang.Throwable -> L93
|
||
|
r11 = 15
|
||
|
r12 = r10[r11] // Catch: java.lang.Throwable -> L93
|
||
|
int r12 = -r12
|
||
|
byte r12 = (byte) r12 // Catch: java.lang.Throwable -> L93
|
||
|
int r13 = r12 + (-1)
|
||
|
byte r13 = (byte) r13 // Catch: java.lang.Throwable -> L93
|
||
|
byte r14 = (byte) r13 // Catch: java.lang.Throwable -> L93
|
||
|
java.lang.Object[] r0 = new java.lang.Object[r2] // Catch: java.lang.Throwable -> L93
|
||
|
y(r12, r13, r14, r0) // Catch: java.lang.Throwable -> L93
|
||
|
r12 = r0[r3] // Catch: java.lang.Throwable -> L93
|
||
|
java.lang.String r12 = (java.lang.String) r12 // Catch: java.lang.Throwable -> L93
|
||
|
java.lang.Class r12 = java.lang.Class.forName(r12) // Catch: java.lang.Throwable -> L93
|
||
|
r10 = r10[r11] // Catch: java.lang.Throwable -> L93
|
||
|
int r11 = r10 + 1
|
||
|
byte r11 = (byte) r11 // Catch: java.lang.Throwable -> L93
|
||
|
int r10 = -r10
|
||
|
byte r10 = (byte) r10 // Catch: java.lang.Throwable -> L93
|
||
|
byte r13 = (byte) r10 // Catch: java.lang.Throwable -> L93
|
||
|
java.lang.Object[] r14 = new java.lang.Object[r2] // Catch: java.lang.Throwable -> L93
|
||
|
y(r11, r10, r13, r14) // Catch: java.lang.Throwable -> L93
|
||
|
r10 = r14[r3] // Catch: java.lang.Throwable -> L93
|
||
|
java.lang.String r10 = (java.lang.String) r10 // Catch: java.lang.Throwable -> L93
|
||
|
r11 = 0
|
||
|
java.lang.reflect.Method r10 = r12.getMethod(r10, r11) // Catch: java.lang.Throwable -> L93
|
||
|
java.lang.Object r10 = r10.invoke(r11, r11) // Catch: java.lang.Throwable -> L93
|
||
|
java.lang.Thread r10 = (java.lang.Thread) r10 // Catch: java.lang.Throwable -> L93
|
||
|
r10.interrupt() // Catch: java.lang.Throwable -> L53
|
||
|
java.io.InterruptedIOException r10 = new java.io.InterruptedIOException // Catch: java.lang.Throwable -> L53
|
||
|
r10.<init>() // Catch: java.lang.Throwable -> L53
|
||
|
throw r10 // Catch: java.lang.Throwable -> L53
|
||
|
L93:
|
||
|
r10 = move-exception
|
||
|
java.lang.Throwable r11 = r10.getCause() // Catch: java.lang.Throwable -> L53
|
||
|
if (r11 == 0) goto L9b
|
||
|
throw r11 // Catch: java.lang.Throwable -> L53
|
||
|
L9b:
|
||
|
throw r10 // Catch: java.lang.Throwable -> L53
|
||
|
L9c:
|
||
|
monitor-exit(r9)
|
||
|
throw r10
|
||
|
L9e:
|
||
|
return
|
||
|
*/
|
||
|
throw new UnsupportedOperationException("Method not decompiled: com.facetec.sdk.lw.e(int, boolean, com.facetec.sdk.ms, long):void");
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public final void d(int i, lo loVar) {
|
||
|
try {
|
||
|
this.s.execute(new kl(this, "OkHttp %s stream %d", new Object[]{this.e, Integer.valueOf(i)}, i, loVar) { // from class: com.facetec.sdk.lw.4
|
||
|
private int a;
|
||
|
private lo c;
|
||
|
private lw d;
|
||
|
|
||
|
{
|
||
|
this.d = this;
|
||
|
this.a = i;
|
||
|
this.c = loVar;
|
||
|
}
|
||
|
|
||
|
@Override // com.facetec.sdk.kl
|
||
|
public final void a() {
|
||
|
try {
|
||
|
this.d.c(this.a, this.c);
|
||
|
} catch (IOException unused) {
|
||
|
this.d.c();
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
} catch (RejectedExecutionException unused) {
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public final void c(int i, lo loVar) throws IOException {
|
||
|
this.f6456o.e(i, loVar);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public final void b(int i, long j) {
|
||
|
try {
|
||
|
this.s.execute(new kl(this, "OkHttp Window Update %s stream %d", new Object[]{this.e, Integer.valueOf(i)}, i, j) { // from class: com.facetec.sdk.lw.1
|
||
|
private lw a;
|
||
|
private int c;
|
||
|
private long e;
|
||
|
|
||
|
{
|
||
|
this.a = this;
|
||
|
this.c = i;
|
||
|
this.e = j;
|
||
|
}
|
||
|
|
||
|
@Override // com.facetec.sdk.kl
|
||
|
public final void a() {
|
||
|
try {
|
||
|
this.a.f6456o.c(this.c, this.e);
|
||
|
} catch (IOException unused) {
|
||
|
this.a.c();
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
} catch (RejectedExecutionException unused) {
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes.dex */
|
||
|
final class d extends kl {
|
||
|
private int a;
|
||
|
private boolean b;
|
||
|
private lw c;
|
||
|
private int d;
|
||
|
|
||
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||
|
d(lw lwVar, boolean z, int i, int i2) {
|
||
|
super("OkHttp %s ping %08x%08x", lwVar.e, Integer.valueOf(i), Integer.valueOf(i2));
|
||
|
this.c = lwVar;
|
||
|
this.b = z;
|
||
|
this.a = i;
|
||
|
this.d = i2;
|
||
|
}
|
||
|
|
||
|
@Override // com.facetec.sdk.kl
|
||
|
public final void a() {
|
||
|
boolean z;
|
||
|
lw lwVar = this.c;
|
||
|
boolean z2 = this.b;
|
||
|
int i = this.a;
|
||
|
int i2 = this.d;
|
||
|
if (!z2) {
|
||
|
synchronized (lwVar) {
|
||
|
z = lwVar.j;
|
||
|
lwVar.j = true;
|
||
|
}
|
||
|
if (z) {
|
||
|
lwVar.c();
|
||
|
return;
|
||
|
}
|
||
|
}
|
||
|
try {
|
||
|
lwVar.f6456o.b(z2, i, i2);
|
||
|
} catch (IOException unused) {
|
||
|
lwVar.c();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public final void e() throws IOException {
|
||
|
this.f6456o.c();
|
||
|
}
|
||
|
|
||
|
private void d(lo loVar) throws IOException {
|
||
|
synchronized (this.f6456o) {
|
||
|
synchronized (this) {
|
||
|
if (this.i) {
|
||
|
return;
|
||
|
}
|
||
|
this.i = true;
|
||
|
this.f6456o.c(this.b, loVar, km.b);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // java.io.Closeable, java.lang.AutoCloseable
|
||
|
public final void close() throws IOException {
|
||
|
e(lo.NO_ERROR, lo.CANCEL);
|
||
|
}
|
||
|
|
||
|
final void e(lo loVar, lo loVar2) throws IOException {
|
||
|
if (!u && Thread.holdsLock(this)) {
|
||
|
throw new AssertionError();
|
||
|
}
|
||
|
ls[] lsVarArr = null;
|
||
|
try {
|
||
|
d(loVar);
|
||
|
e = null;
|
||
|
} catch (IOException e) {
|
||
|
e = e;
|
||
|
}
|
||
|
synchronized (this) {
|
||
|
if (!this.c.isEmpty()) {
|
||
|
lsVarArr = (ls[]) this.c.values().toArray(new ls[this.c.size()]);
|
||
|
this.c.clear();
|
||
|
}
|
||
|
}
|
||
|
if (lsVarArr != null) {
|
||
|
for (ls lsVar : lsVarArr) {
|
||
|
try {
|
||
|
lsVar.e(loVar2);
|
||
|
} catch (IOException e2) {
|
||
|
if (e != null) {
|
||
|
e = e2;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
try {
|
||
|
this.f6456o.close();
|
||
|
} catch (IOException e3) {
|
||
|
if (e == null) {
|
||
|
e = e3;
|
||
|
}
|
||
|
}
|
||
|
try {
|
||
|
this.w.close();
|
||
|
} catch (IOException e4) {
|
||
|
e = e4;
|
||
|
}
|
||
|
this.s.shutdown();
|
||
|
this.p.shutdown();
|
||
|
if (e != null) {
|
||
|
throw e;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public final void c() {
|
||
|
try {
|
||
|
lo loVar = lo.PROTOCOL_ERROR;
|
||
|
e(loVar, loVar);
|
||
|
} catch (IOException unused) {
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public final boolean a() {
|
||
|
boolean z;
|
||
|
synchronized (this) {
|
||
|
z = this.i;
|
||
|
}
|
||
|
return z;
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes.dex */
|
||
|
final class b extends kl implements lv.d {
|
||
|
final lw a;
|
||
|
private lv c;
|
||
|
|
||
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||
|
b(lw lwVar, lv lvVar) {
|
||
|
super("OkHttp %s", lwVar.e);
|
||
|
this.a = lwVar;
|
||
|
this.c = lvVar;
|
||
|
}
|
||
|
|
||
|
@Override // com.facetec.sdk.kl
|
||
|
public final void a() {
|
||
|
lo loVar;
|
||
|
lo loVar2;
|
||
|
lw lwVar;
|
||
|
lo loVar3 = lo.INTERNAL_ERROR;
|
||
|
lo loVar4 = lo.INTERNAL_ERROR;
|
||
|
try {
|
||
|
try {
|
||
|
try {
|
||
|
lv lvVar = this.c;
|
||
|
if (lvVar.c) {
|
||
|
if (!lvVar.c(true, this)) {
|
||
|
throw lt.b("Required SETTINGS preface not received", new Object[0]);
|
||
|
}
|
||
|
} else {
|
||
|
mt b = lvVar.b.b(lt.d.i());
|
||
|
if (lv.d.isLoggable(Level.FINE)) {
|
||
|
lv.d.fine(km.a("<< CONNECTION %s", b.c()));
|
||
|
}
|
||
|
if (!lt.d.equals(b)) {
|
||
|
throw lt.b("Expected a connection header but was %s", b.b());
|
||
|
}
|
||
|
}
|
||
|
do {
|
||
|
} while (this.c.c(false, this));
|
||
|
loVar = lo.NO_ERROR;
|
||
|
loVar2 = lo.CANCEL;
|
||
|
lwVar = this.a;
|
||
|
} catch (IOException unused) {
|
||
|
}
|
||
|
} catch (IOException unused2) {
|
||
|
loVar = lo.PROTOCOL_ERROR;
|
||
|
loVar2 = lo.PROTOCOL_ERROR;
|
||
|
lwVar = this.a;
|
||
|
}
|
||
|
lwVar.e(loVar, loVar2);
|
||
|
km.a(this.c);
|
||
|
} catch (Throwable th) {
|
||
|
try {
|
||
|
this.a.e(loVar3, loVar4);
|
||
|
} catch (IOException unused3) {
|
||
|
}
|
||
|
km.a(this.c);
|
||
|
throw th;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // com.facetec.sdk.lv.d
|
||
|
public final void d(boolean z, int i, mr mrVar, int i2) throws IOException {
|
||
|
boolean z2;
|
||
|
boolean z3;
|
||
|
boolean z4;
|
||
|
if (!lw.b(i)) {
|
||
|
ls c = this.a.c(i);
|
||
|
if (c == null) {
|
||
|
this.a.d(i, lo.PROTOCOL_ERROR);
|
||
|
long j = i2;
|
||
|
this.a.e(j);
|
||
|
mrVar.f(j);
|
||
|
return;
|
||
|
}
|
||
|
if (!ls.k && Thread.holdsLock(c)) {
|
||
|
throw new AssertionError();
|
||
|
}
|
||
|
ls.b bVar = c.j;
|
||
|
long j2 = i2;
|
||
|
if (!ls.b.f && Thread.holdsLock(bVar.h)) {
|
||
|
throw new AssertionError();
|
||
|
}
|
||
|
while (true) {
|
||
|
if (j2 <= 0) {
|
||
|
break;
|
||
|
}
|
||
|
synchronized (bVar.h) {
|
||
|
z2 = bVar.b;
|
||
|
z3 = true;
|
||
|
z4 = bVar.d.c() + j2 > bVar.e;
|
||
|
}
|
||
|
if (z4) {
|
||
|
mrVar.f(j2);
|
||
|
bVar.h.d(lo.FLOW_CONTROL_ERROR);
|
||
|
break;
|
||
|
}
|
||
|
if (z2) {
|
||
|
mrVar.f(j2);
|
||
|
break;
|
||
|
}
|
||
|
long b = mrVar.b(bVar.c, j2);
|
||
|
if (b == -1) {
|
||
|
throw new EOFException();
|
||
|
}
|
||
|
j2 -= b;
|
||
|
synchronized (bVar.h) {
|
||
|
if (bVar.d.c() != 0) {
|
||
|
z3 = false;
|
||
|
}
|
||
|
bVar.d.d(bVar.c);
|
||
|
if (z3) {
|
||
|
bVar.h.notifyAll();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if (z) {
|
||
|
c.j();
|
||
|
return;
|
||
|
}
|
||
|
return;
|
||
|
}
|
||
|
lw lwVar = this.a;
|
||
|
ms msVar = new ms();
|
||
|
long j3 = i2;
|
||
|
mrVar.e(j3);
|
||
|
mrVar.b(msVar, j3);
|
||
|
if (msVar.c() != j3) {
|
||
|
StringBuilder sb = new StringBuilder();
|
||
|
sb.append(msVar.c());
|
||
|
sb.append(" != ");
|
||
|
sb.append(i2);
|
||
|
throw new IOException(sb.toString());
|
||
|
}
|
||
|
lwVar.c(new kl(lwVar, "OkHttp %s Push Data[%s]", new Object[]{lwVar.e, Integer.valueOf(i)}, i, msVar, i2, z) { // from class: com.facetec.sdk.lw.5
|
||
|
private boolean a;
|
||
|
private lw b;
|
||
|
private int c;
|
||
|
private ms d;
|
||
|
private int e;
|
||
|
|
||
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||
|
{
|
||
|
super(r2, r3);
|
||
|
this.b = lwVar;
|
||
|
this.e = i;
|
||
|
this.d = msVar;
|
||
|
this.c = i2;
|
||
|
this.a = z;
|
||
|
}
|
||
|
|
||
|
@Override // com.facetec.sdk.kl
|
||
|
public final void a() {
|
||
|
try {
|
||
|
this.b.g.d(this.d, this.c);
|
||
|
this.b.f6456o.e(this.e, lo.CANCEL);
|
||
|
synchronized (this.b) {
|
||
|
this.b.r.remove(Integer.valueOf(this.e));
|
||
|
}
|
||
|
} catch (IOException unused) {
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
@Override // com.facetec.sdk.lv.d
|
||
|
public final void a(boolean z, int i, List<ln> list) {
|
||
|
boolean a;
|
||
|
if (!lw.b(i)) {
|
||
|
synchronized (this.a) {
|
||
|
ls c = this.a.c(i);
|
||
|
if (c == null) {
|
||
|
if (this.a.i) {
|
||
|
return;
|
||
|
}
|
||
|
if (i <= this.a.b) {
|
||
|
return;
|
||
|
}
|
||
|
if (i % 2 == this.a.f % 2) {
|
||
|
return;
|
||
|
}
|
||
|
ls lsVar = new ls(i, this.a, false, z, km.b(list));
|
||
|
this.a.b = i;
|
||
|
this.a.c.put(Integer.valueOf(i), lsVar);
|
||
|
lw.q.execute(new kl(this, "OkHttp %s stream %d", new Object[]{this.a.e, Integer.valueOf(i)}, lsVar) { // from class: com.facetec.sdk.lw.b.4
|
||
|
private ls b;
|
||
|
private b c;
|
||
|
|
||
|
{
|
||
|
this.c = this;
|
||
|
this.b = lsVar;
|
||
|
}
|
||
|
|
||
|
@Override // com.facetec.sdk.kl
|
||
|
public final void a() {
|
||
|
try {
|
||
|
this.c.a.d.e(this.b);
|
||
|
} catch (IOException e) {
|
||
|
mi c2 = mi.c();
|
||
|
StringBuilder sb = new StringBuilder("Http2Connection.Listener failure for ");
|
||
|
sb.append(this.c.a.e);
|
||
|
c2.d(4, sb.toString(), e);
|
||
|
try {
|
||
|
this.b.e(lo.PROTOCOL_ERROR);
|
||
|
} catch (IOException unused) {
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
return;
|
||
|
}
|
||
|
if (!ls.k && Thread.holdsLock(c)) {
|
||
|
throw new AssertionError();
|
||
|
}
|
||
|
synchronized (c) {
|
||
|
c.h = true;
|
||
|
c.d.add(km.b(list));
|
||
|
a = c.a();
|
||
|
c.notifyAll();
|
||
|
}
|
||
|
if (!a) {
|
||
|
c.e.d(c.c);
|
||
|
}
|
||
|
if (z) {
|
||
|
c.j();
|
||
|
return;
|
||
|
}
|
||
|
return;
|
||
|
}
|
||
|
}
|
||
|
lw lwVar = this.a;
|
||
|
try {
|
||
|
lwVar.c(new kl(lwVar, "OkHttp %s Push Headers[%s]", new Object[]{lwVar.e, Integer.valueOf(i)}, i, list, z) { // from class: com.facetec.sdk.lw.2
|
||
|
private List a;
|
||
|
private boolean b;
|
||
|
private int c;
|
||
|
private lw e;
|
||
|
|
||
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||
|
{
|
||
|
super(r2, r3);
|
||
|
this.e = lwVar;
|
||
|
this.c = i;
|
||
|
this.a = list;
|
||
|
this.b = z;
|
||
|
}
|
||
|
|
||
|
@Override // com.facetec.sdk.kl
|
||
|
public final void a() {
|
||
|
ma maVar = this.e.g;
|
||
|
try {
|
||
|
this.e.f6456o.e(this.c, lo.CANCEL);
|
||
|
synchronized (this.e) {
|
||
|
this.e.r.remove(Integer.valueOf(this.c));
|
||
|
}
|
||
|
} catch (IOException unused) {
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
} catch (RejectedExecutionException unused) {
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // com.facetec.sdk.lv.d
|
||
|
public final void a(int i, lo loVar) {
|
||
|
if (!lw.b(i)) {
|
||
|
ls d = this.a.d(i);
|
||
|
if (d != null) {
|
||
|
d.a(loVar);
|
||
|
return;
|
||
|
}
|
||
|
return;
|
||
|
}
|
||
|
lw lwVar = this.a;
|
||
|
lwVar.c(new kl(lwVar, "OkHttp %s Push Reset[%s]", new Object[]{lwVar.e, Integer.valueOf(i)}, i, loVar) { // from class: com.facetec.sdk.lw.7
|
||
|
private lw a;
|
||
|
private int c;
|
||
|
private lo d;
|
||
|
|
||
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||
|
{
|
||
|
super(r2, r3);
|
||
|
this.a = lwVar;
|
||
|
this.c = i;
|
||
|
this.d = loVar;
|
||
|
}
|
||
|
|
||
|
@Override // com.facetec.sdk.kl
|
||
|
public final void a() {
|
||
|
ma maVar = this.a.g;
|
||
|
synchronized (this.a) {
|
||
|
this.a.r.remove(Integer.valueOf(this.c));
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
@Override // com.facetec.sdk.lv.d
|
||
|
public final void b(mb mbVar) {
|
||
|
int i;
|
||
|
ls[] lsVarArr;
|
||
|
long j;
|
||
|
synchronized (this.a) {
|
||
|
int c = this.a.k.c();
|
||
|
mb mbVar2 = this.a.k;
|
||
|
for (int i2 = 0; i2 < 10; i2++) {
|
||
|
if (mbVar.e(i2)) {
|
||
|
mbVar2.c(i2, mbVar.b(i2));
|
||
|
}
|
||
|
}
|
||
|
try {
|
||
|
this.a.s.execute(new kl(this, "OkHttp %s ACK Settings", new Object[]{this.a.e}, mbVar) { // from class: com.facetec.sdk.lw.b.2
|
||
|
private mb a;
|
||
|
private b b;
|
||
|
|
||
|
{
|
||
|
this.b = this;
|
||
|
this.a = mbVar;
|
||
|
}
|
||
|
|
||
|
@Override // com.facetec.sdk.kl
|
||
|
public final void a() {
|
||
|
try {
|
||
|
this.b.a.f6456o.d(this.a);
|
||
|
} catch (IOException unused) {
|
||
|
this.b.a.c();
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
} catch (RejectedExecutionException unused) {
|
||
|
}
|
||
|
int c2 = this.a.k.c();
|
||
|
lsVarArr = null;
|
||
|
if (c2 == -1 || c2 == c) {
|
||
|
j = 0;
|
||
|
} else {
|
||
|
j = c2 - c;
|
||
|
if (!this.a.n) {
|
||
|
this.a.n = true;
|
||
|
}
|
||
|
if (!this.a.c.isEmpty()) {
|
||
|
lsVarArr = (ls[]) this.a.c.values().toArray(new ls[this.a.c.size()]);
|
||
|
}
|
||
|
}
|
||
|
lw.q.execute(new kl(this, "OkHttp %s settings", this.a.e) { // from class: com.facetec.sdk.lw.b.3
|
||
|
private b b;
|
||
|
|
||
|
{
|
||
|
this.b = this;
|
||
|
}
|
||
|
|
||
|
@Override // com.facetec.sdk.kl
|
||
|
public final void a() {
|
||
|
this.b.a.d.c(this.b.a);
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
if (lsVarArr == null || j == 0) {
|
||
|
return;
|
||
|
}
|
||
|
for (ls lsVar : lsVarArr) {
|
||
|
synchronized (lsVar) {
|
||
|
lsVar.c(j);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // com.facetec.sdk.lv.d
|
||
|
public final void c(boolean z, int i, int i2) {
|
||
|
if (!z) {
|
||
|
try {
|
||
|
this.a.s.execute(new d(this.a, true, i, i2));
|
||
|
} catch (RejectedExecutionException unused) {
|
||
|
}
|
||
|
} else {
|
||
|
synchronized (this.a) {
|
||
|
lw.e(this.a);
|
||
|
this.a.notifyAll();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // com.facetec.sdk.lv.d
|
||
|
public final void c(int i, mt mtVar) {
|
||
|
ls[] lsVarArr;
|
||
|
mtVar.i();
|
||
|
synchronized (this.a) {
|
||
|
lsVarArr = (ls[]) this.a.c.values().toArray(new ls[this.a.c.size()]);
|
||
|
this.a.i = true;
|
||
|
}
|
||
|
for (ls lsVar : lsVarArr) {
|
||
|
if (lsVar.e() > i && lsVar.b()) {
|
||
|
lsVar.a(lo.REFUSED_STREAM);
|
||
|
this.a.d(lsVar.e());
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // com.facetec.sdk.lv.d
|
||
|
public final void b(int i, long j) {
|
||
|
if (i == 0) {
|
||
|
synchronized (this.a) {
|
||
|
this.a.h += j;
|
||
|
this.a.notifyAll();
|
||
|
}
|
||
|
return;
|
||
|
}
|
||
|
ls c = this.a.c(i);
|
||
|
if (c != null) {
|
||
|
synchronized (c) {
|
||
|
c.c(j);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // com.facetec.sdk.lv.d
|
||
|
public final void d(int i, List<ln> list) {
|
||
|
lw lwVar = this.a;
|
||
|
synchronized (lwVar) {
|
||
|
if (lwVar.r.contains(Integer.valueOf(i))) {
|
||
|
lwVar.d(i, lo.PROTOCOL_ERROR);
|
||
|
return;
|
||
|
}
|
||
|
lwVar.r.add(Integer.valueOf(i));
|
||
|
try {
|
||
|
lwVar.c(new kl(lwVar, "OkHttp %s Push Request[%s]", new Object[]{lwVar.e, Integer.valueOf(i)}, i, list) { // from class: com.facetec.sdk.lw.3
|
||
|
private lw a;
|
||
|
private int b;
|
||
|
private List c;
|
||
|
|
||
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||
|
{
|
||
|
super(r2, r3);
|
||
|
this.a = lwVar;
|
||
|
this.b = i;
|
||
|
this.c = list;
|
||
|
}
|
||
|
|
||
|
@Override // com.facetec.sdk.kl
|
||
|
public final void a() {
|
||
|
ma maVar = this.a.g;
|
||
|
try {
|
||
|
this.a.f6456o.e(this.b, lo.CANCEL);
|
||
|
synchronized (this.a) {
|
||
|
this.a.r.remove(Integer.valueOf(this.b));
|
||
|
}
|
||
|
} catch (IOException unused) {
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
} catch (RejectedExecutionException unused) {
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
final void c(kl klVar) {
|
||
|
synchronized (this) {
|
||
|
if (!a()) {
|
||
|
this.p.execute(klVar);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public final int d() {
|
||
|
synchronized (this) {
|
||
|
mb mbVar = this.k;
|
||
|
if ((mbVar.e & 16) == 0) {
|
||
|
return Integer.MAX_VALUE;
|
||
|
}
|
||
|
return mbVar.a[4];
|
||
|
}
|
||
|
}
|
||
|
|
||
|
static void j() {
|
||
|
x = new byte[]{89, ISOFileInfo.SECURITY_ATTR_COMPACT, 33, -15, -16, 5, 2, 15, -7, -4, ISO7816.INS_MSE, -18, -8, 15, 6, -1, 11, -19, Ascii.ETB, 53, -60, 13, -11, 9, 59, ISO7816.INS_UPDATE_RECORD, -18, -8, 15, 6, -1};
|
||
|
v = 12;
|
||
|
}
|
||
|
}
|