- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
277 lines
11 KiB
Java
277 lines
11 KiB
Java
package okhttp3;
|
|
|
|
import androidx.core.app.NotificationCompat;
|
|
import java.io.IOException;
|
|
import java.io.InterruptedIOException;
|
|
import java.util.concurrent.ExecutorService;
|
|
import java.util.concurrent.RejectedExecutionException;
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
import okhttp3.internal.NamedRunnable;
|
|
import okhttp3.internal.connection.Transmitter;
|
|
import okhttp3.internal.platform.Platform;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public final class RealCall implements Call {
|
|
public final OkHttpClient client;
|
|
public boolean executed;
|
|
public final boolean forWebSocket;
|
|
public final Request originalRequest;
|
|
public Transmitter transmitter;
|
|
|
|
@Override // okhttp3.Call
|
|
public Request request() {
|
|
return this.originalRequest;
|
|
}
|
|
|
|
public RealCall(OkHttpClient okHttpClient, Request request, boolean z) {
|
|
this.client = okHttpClient;
|
|
this.originalRequest = request;
|
|
this.forWebSocket = z;
|
|
}
|
|
|
|
public static RealCall newRealCall(OkHttpClient okHttpClient, Request request, boolean z) {
|
|
RealCall realCall = new RealCall(okHttpClient, request, z);
|
|
realCall.transmitter = new Transmitter(okHttpClient, realCall);
|
|
return realCall;
|
|
}
|
|
|
|
@Override // okhttp3.Call
|
|
public Response execute() {
|
|
synchronized (this) {
|
|
if (this.executed) {
|
|
throw new IllegalStateException("Already Executed");
|
|
}
|
|
this.executed = true;
|
|
}
|
|
this.transmitter.timeoutEnter();
|
|
this.transmitter.callStart();
|
|
try {
|
|
this.client.dispatcher().executed(this);
|
|
return getResponseWithInterceptorChain();
|
|
} finally {
|
|
this.client.dispatcher().finished(this);
|
|
}
|
|
}
|
|
|
|
@Override // okhttp3.Call
|
|
public void enqueue(Callback callback) {
|
|
synchronized (this) {
|
|
if (this.executed) {
|
|
throw new IllegalStateException("Already Executed");
|
|
}
|
|
this.executed = true;
|
|
}
|
|
this.transmitter.callStart();
|
|
this.client.dispatcher().enqueue(new AsyncCall(callback));
|
|
}
|
|
|
|
@Override // okhttp3.Call
|
|
public void cancel() {
|
|
this.transmitter.cancel();
|
|
}
|
|
|
|
@Override // okhttp3.Call
|
|
public boolean isCanceled() {
|
|
return this.transmitter.isCanceled();
|
|
}
|
|
|
|
public RealCall clone() {
|
|
return newRealCall(this.client, this.originalRequest, this.forWebSocket);
|
|
}
|
|
|
|
public final class AsyncCall extends NamedRunnable {
|
|
public volatile AtomicInteger callsPerHost;
|
|
public final Callback responseCallback;
|
|
|
|
public AtomicInteger callsPerHost() {
|
|
return this.callsPerHost;
|
|
}
|
|
|
|
public RealCall get() {
|
|
return RealCall.this;
|
|
}
|
|
|
|
public AsyncCall(Callback callback) {
|
|
super("OkHttp %s", RealCall.this.redactedUrl());
|
|
this.callsPerHost = new AtomicInteger(0);
|
|
this.responseCallback = callback;
|
|
}
|
|
|
|
public void reuseCallsPerHostFrom(AsyncCall asyncCall) {
|
|
this.callsPerHost = asyncCall.callsPerHost;
|
|
}
|
|
|
|
public String host() {
|
|
return RealCall.this.originalRequest.url().host();
|
|
}
|
|
|
|
public void executeOn(ExecutorService executorService) {
|
|
try {
|
|
try {
|
|
executorService.execute(this);
|
|
} catch (RejectedExecutionException e) {
|
|
InterruptedIOException interruptedIOException = new InterruptedIOException("executor rejected");
|
|
interruptedIOException.initCause(e);
|
|
RealCall.this.transmitter.noMoreExchanges(interruptedIOException);
|
|
this.responseCallback.onFailure(RealCall.this, interruptedIOException);
|
|
RealCall.this.client.dispatcher().finished(this);
|
|
}
|
|
} catch (Throwable th) {
|
|
RealCall.this.client.dispatcher().finished(this);
|
|
throw th;
|
|
}
|
|
}
|
|
|
|
@Override // okhttp3.internal.NamedRunnable
|
|
public void execute() {
|
|
boolean z;
|
|
Throwable th;
|
|
IOException e;
|
|
RealCall.this.transmitter.timeoutEnter();
|
|
try {
|
|
try {
|
|
z = true;
|
|
try {
|
|
this.responseCallback.onResponse(RealCall.this, RealCall.this.getResponseWithInterceptorChain());
|
|
} catch (IOException e2) {
|
|
e = e2;
|
|
if (z) {
|
|
Platform.get().log(4, "Callback failure for " + RealCall.this.toLoggableString(), e);
|
|
} else {
|
|
this.responseCallback.onFailure(RealCall.this, e);
|
|
}
|
|
RealCall.this.client.dispatcher().finished(this);
|
|
} catch (Throwable th2) {
|
|
th = th2;
|
|
RealCall.this.cancel();
|
|
if (!z) {
|
|
IOException iOException = new IOException("canceled due to " + th);
|
|
iOException.addSuppressed(th);
|
|
this.responseCallback.onFailure(RealCall.this, iOException);
|
|
}
|
|
throw th;
|
|
}
|
|
} catch (Throwable th3) {
|
|
RealCall.this.client.dispatcher().finished(this);
|
|
throw th3;
|
|
}
|
|
} catch (IOException e3) {
|
|
z = false;
|
|
e = e3;
|
|
} catch (Throwable th4) {
|
|
z = false;
|
|
th = th4;
|
|
}
|
|
RealCall.this.client.dispatcher().finished(this);
|
|
}
|
|
}
|
|
|
|
public String toLoggableString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append(isCanceled() ? "canceled " : "");
|
|
sb.append(this.forWebSocket ? "web socket" : NotificationCompat.CATEGORY_CALL);
|
|
sb.append(" to ");
|
|
sb.append(redactedUrl());
|
|
return sb.toString();
|
|
}
|
|
|
|
public String redactedUrl() {
|
|
return this.originalRequest.url().redact();
|
|
}
|
|
|
|
/* JADX WARN: Removed duplicated region for block: B:23:0x00a6 */
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public okhttp3.Response getResponseWithInterceptorChain() {
|
|
/*
|
|
r12 = this;
|
|
java.util.ArrayList r1 = new java.util.ArrayList
|
|
r1.<init>()
|
|
okhttp3.OkHttpClient r0 = r12.client
|
|
java.util.List r0 = r0.interceptors()
|
|
r1.addAll(r0)
|
|
okhttp3.internal.http.RetryAndFollowUpInterceptor r0 = new okhttp3.internal.http.RetryAndFollowUpInterceptor
|
|
okhttp3.OkHttpClient r2 = r12.client
|
|
r0.<init>(r2)
|
|
r1.add(r0)
|
|
okhttp3.internal.http.BridgeInterceptor r0 = new okhttp3.internal.http.BridgeInterceptor
|
|
okhttp3.OkHttpClient r2 = r12.client
|
|
okhttp3.CookieJar r2 = r2.cookieJar()
|
|
r0.<init>(r2)
|
|
r1.add(r0)
|
|
okhttp3.internal.cache.CacheInterceptor r0 = new okhttp3.internal.cache.CacheInterceptor
|
|
okhttp3.OkHttpClient r2 = r12.client
|
|
okhttp3.internal.cache.InternalCache r2 = r2.internalCache()
|
|
r0.<init>(r2)
|
|
r1.add(r0)
|
|
okhttp3.internal.connection.ConnectInterceptor r0 = new okhttp3.internal.connection.ConnectInterceptor
|
|
okhttp3.OkHttpClient r2 = r12.client
|
|
r0.<init>(r2)
|
|
r1.add(r0)
|
|
boolean r0 = r12.forWebSocket
|
|
if (r0 != 0) goto L4b
|
|
okhttp3.OkHttpClient r0 = r12.client
|
|
java.util.List r0 = r0.networkInterceptors()
|
|
r1.addAll(r0)
|
|
L4b:
|
|
okhttp3.internal.http.CallServerInterceptor r0 = new okhttp3.internal.http.CallServerInterceptor
|
|
boolean r2 = r12.forWebSocket
|
|
r0.<init>(r2)
|
|
r1.add(r0)
|
|
okhttp3.internal.http.RealInterceptorChain r10 = new okhttp3.internal.http.RealInterceptorChain
|
|
okhttp3.internal.connection.Transmitter r2 = r12.transmitter
|
|
r3 = 0
|
|
r4 = 0
|
|
okhttp3.Request r5 = r12.originalRequest
|
|
okhttp3.OkHttpClient r0 = r12.client
|
|
int r7 = r0.connectTimeoutMillis()
|
|
okhttp3.OkHttpClient r0 = r12.client
|
|
int r8 = r0.readTimeoutMillis()
|
|
okhttp3.OkHttpClient r0 = r12.client
|
|
int r9 = r0.writeTimeoutMillis()
|
|
r0 = r10
|
|
r6 = r12
|
|
r0.<init>(r1, r2, r3, r4, r5, r6, r7, r8, r9)
|
|
r0 = 0
|
|
r1 = 0
|
|
okhttp3.Request r2 = r12.originalRequest // Catch: java.lang.Throwable -> L95 java.io.IOException -> L97
|
|
okhttp3.Response r2 = r10.proceed(r2) // Catch: java.lang.Throwable -> L95 java.io.IOException -> L97
|
|
okhttp3.internal.connection.Transmitter r3 = r12.transmitter // Catch: java.lang.Throwable -> L95 java.io.IOException -> L97
|
|
boolean r3 = r3.isCanceled() // Catch: java.lang.Throwable -> L95 java.io.IOException -> L97
|
|
if (r3 != 0) goto L8a
|
|
okhttp3.internal.connection.Transmitter r1 = r12.transmitter
|
|
r1.noMoreExchanges(r0)
|
|
return r2
|
|
L8a:
|
|
okhttp3.internal.Util.closeQuietly(r2) // Catch: java.lang.Throwable -> L95 java.io.IOException -> L97
|
|
java.io.IOException r2 = new java.io.IOException // Catch: java.lang.Throwable -> L95 java.io.IOException -> L97
|
|
java.lang.String r3 = "Canceled"
|
|
r2.<init>(r3) // Catch: java.lang.Throwable -> L95 java.io.IOException -> L97
|
|
throw r2 // Catch: java.lang.Throwable -> L95 java.io.IOException -> L97
|
|
L95:
|
|
r2 = move-exception
|
|
goto La4
|
|
L97:
|
|
r1 = move-exception
|
|
r2 = 1
|
|
okhttp3.internal.connection.Transmitter r3 = r12.transmitter // Catch: java.lang.Throwable -> La0
|
|
java.io.IOException r1 = r3.noMoreExchanges(r1) // Catch: java.lang.Throwable -> La0
|
|
throw r1 // Catch: java.lang.Throwable -> La0
|
|
La0:
|
|
r1 = move-exception
|
|
r11 = r2
|
|
r2 = r1
|
|
r1 = r11
|
|
La4:
|
|
if (r1 != 0) goto Lab
|
|
okhttp3.internal.connection.Transmitter r1 = r12.transmitter
|
|
r1.noMoreExchanges(r0)
|
|
Lab:
|
|
throw r2
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: okhttp3.RealCall.getResponseWithInterceptorChain():okhttp3.Response");
|
|
}
|
|
}
|