Rabbit-R1/switch port/java/sources/okhttp3/OkHttpClient.java
2024-05-21 17:08:36 -04:00

1211 lines
74 KiB
Java
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package okhttp3;
import io.sentry.ProfilingTraceData;
import io.sentry.SentryBaseEvent;
import io.sentry.okhttp.SentryOkHttpEventListener;
import io.sentry.protocol.OperatingSystem;
import java.net.Proxy;
import java.net.ProxySelector;
import java.time.Duration;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Random;
import java.util.concurrent.TimeUnit;
import javax.net.SocketFactory;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLSocketFactory;
import javax.net.ssl.X509TrustManager;
import kotlin.Deprecated;
import kotlin.DeprecationLevel;
import kotlin.Metadata;
import kotlin.ReplaceWith;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import okhttp3.Call;
import okhttp3.EventListener;
import okhttp3.Interceptor;
import okhttp3.WebSocket;
import okhttp3.internal.Util;
import okhttp3.internal.concurrent.TaskRunner;
import okhttp3.internal.connection.RealCall;
import okhttp3.internal.connection.RouteDatabase;
import okhttp3.internal.platform.Platform;
import okhttp3.internal.proxy.NullProxySelector;
import okhttp3.internal.tls.CertificateChainCleaner;
import okhttp3.internal.tls.OkHostnameVerifier;
import okhttp3.internal.ws.RealWebSocket;
/* compiled from: OkHttpClient.kt */
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000î\u0001\n\u0002\u0018\u0002\n\u0002\u0010\u001a\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\t\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0013\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\n\n\u0002\u0010\u0002\n\u0002\b\u0004\b\u0016\u0018\u0000 y2\u00020\u00012\u00020\u00022\u00020\u0003:\u0002xyB\u0007\b\u0016¢\u0006\u0002\u0010\u0004B\u000f\b\u0000\u0012\u0006\u0010\u0005\u001a\u00020\u0006¢\u0006\u0002\u0010\u0007J\r\u0010\b\u001a\u00020\tH\u0007¢\u0006\u0002\bSJ\u000f\u0010\u000b\u001a\u0004\u0018\u00010\fH\u0007¢\u0006\u0002\bTJ\r\u0010\u000e\u001a\u00020\u000fH\u0007¢\u0006\u0002\bUJ\r\u0010\u0014\u001a\u00020\u0015H\u0007¢\u0006\u0002\bVJ\r\u0010\u0017\u001a\u00020\u000fH\u0007¢\u0006\u0002\bWJ\r\u0010\u0018\u001a\u00020\u0019H\u0007¢\u0006\u0002\bXJ\u0013\u0010\u001b\u001a\b\u0012\u0004\u0012\u00020\u001d0\u001cH\u0007¢\u0006\u0002\bYJ\r\u0010\u001f\u001a\u00020 H\u0007¢\u0006\u0002\bZJ\r\u0010\"\u001a\u00020#H\u0007¢\u0006\u0002\b[J\r\u0010%\u001a\u00020&H\u0007¢\u0006\u0002\b\\J\r\u0010(\u001a\u00020)H\u0007¢\u0006\u0002\b]J\r\u0010+\u001a\u00020,H\u0007¢\u0006\u0002\b^J\r\u0010.\u001a\u00020,H\u0007¢\u0006\u0002\b_J\r\u0010/\u001a\u000200H\u0007¢\u0006\u0002\b`J\u0013\u00102\u001a\b\u0012\u0004\u0012\u0002030\u001cH\u0007¢\u0006\u0002\baJ\u0013\u00107\u001a\b\u0012\u0004\u0012\u0002030\u001cH\u0007¢\u0006\u0002\bbJ\b\u0010c\u001a\u00020\u0006H\u0016J\u0010\u0010d\u001a\u00020e2\u0006\u0010f\u001a\u00020gH\u0016J\u0018\u0010h\u001a\u00020i2\u0006\u0010f\u001a\u00020g2\u0006\u0010j\u001a\u00020kH\u0016J\r\u00108\u001a\u00020\u000fH\u0007¢\u0006\u0002\blJ\u0013\u00109\u001a\b\u0012\u0004\u0012\u00020:0\u001cH\u0007¢\u0006\u0002\bmJ\u000f\u0010;\u001a\u0004\u0018\u00010<H\u0007¢\u0006\u0002\bnJ\r\u0010>\u001a\u00020\tH\u0007¢\u0006\u0002\boJ\r\u0010?\u001a\u00020@H\u0007¢\u0006\u0002\bpJ\r\u0010B\u001a\u00020\u000fH\u0007¢\u0006\u0002\bqJ\r\u0010C\u001a\u00020,H\u0007¢\u0006\u0002\brJ\r\u0010H\u001a\u00020IH\u0007¢\u0006\u0002\bsJ\r\u0010K\u001a\u00020LH\u0007¢\u0006\u0002\btJ\b\u0010u\u001a\u00020vH\u0002J\r\u0010O\u001a\u00020\u000fH\u0007¢\u0006\u0002\bwR\u0013\u0010\b\u001a\u00020\t8G¢\u0006\b\n\u0000\u001a\u0004\b\b\u0010\nR\u0015\u0010\u000b\u001a\u0004\u0018\u00010\f8G¢\u0006\b\n\u0000\u001a\u0004\b\u000b\u0010\rR\u0013\u0010\u000e\u001a\u00020\u000f8G¢\u0006\b\n\u0000\u001a\u0004\b\u000e\u0010\u0010R\u0015\u0010\u0011\u001a\u0004\u0018\u00010\u00128G¢\u0006\b\n\u0000\u001a\u0004\b\u0011\u0010\u0013R\u0013\u0010\u0014\u001a\u00020\u00158G¢\u0006\b\n\u0000\u001a\u0004\b\u0014\u0010\u0016R\u0013\u0010\u0017\u001a\u00020\u000f8G¢\u0006\b\n\u0000\u001a\u0004\b\u0017\u0010\u0010R\u0013\u0010\u0018\u001a\u00020\u00198G¢\u0006\b\n\u0000\u001a\u0004\b\u0018\u0010\u001aR\u0019\u0010\u001b\u001a\b\u0012\u0004\u0012\u00020\u001d0\u001c8G¢\u0006\b\n\u0000\u001a\u0004\b\u001b\u0010\u001eR\u0013\u0010\u001f\u001a\u00020 8G¢\u0006\b\n\u0000\u001a\u0004\b\u001f\u0010!R\u0013\u0010\"\u001a\u00020#8G¢\u0006\b\n\u0000\u001a\u0004\b\"\u0010$R\u0013\u0010%\u001a\u00020&8G¢\u0006\b\n\u0000\u001a\u0004\b%\u0010'R\u0013\u0010(\u001a\u00020)8G¢\u0006\b\n\u0000\u001a\u0004\b(\u0010*R\u0013\u0010+\u001a\u00020,8G¢\u0006\b\n\u0000\u001a\u0004\b+\u0010-R\u0013\u0010.\u001a\u00020,8G¢\u0006\b\n\u0000\u001a\u0004\b.\u0010-R\u0013\u0010/\u001a\u0002008G¢\u0006\b\n\u0000\u001a\u0004\b/\u00101R\u0019\u00102\u001a\b\u0012\u0004\u0012\u0002030\u001c8G¢\u0006\b\n\u0000\u001a\u0004\b2\u0010\u001eR\u0013\u00104\u001a\u0002058G¢\u0006\b\n\u0000\u001a\u0004\b4\u00106R\u0019\u00107\u001a\b\u0012\u0004\u0012\u0002030\u001c8G¢\u0006\b\n\u0000\u001a\u0004\b7\u0010\u001eR\u0013\u00108\u001a\u00020\u000f8G¢\u0006\b\n\u0000\u001a\u0004\b8\u0010\u0010R\u0019\u00109\u001a\b\u0012\u0004\u0012\u00020:0\u001c8G¢\u0006\b\n\u0000\u001a\u0004\b9\u0010\u001eR\u0015\u0010;\u001a\u0004\u0018\u00010<8G¢\u0006\b\n\u0000\u001a\u0004\b;\u0010=R\u0013\u0010>\u001a\u00020\t8G¢\u0006\b\n\u0000\u001a\u0004\b>\u0010\nR\u0013\u0010?\u001a\u00020@8G¢\u0006\b\n\u0000\u001a\u0004\b?\u0010AR\u0013\u0010B\u001a\u00020\u000f8G¢\u0006\b\n\u0000\u001a\u0004\bB\u0010\u0010R\u0013\u0010C\u001a\u00020,8G¢\u0006\b\n\u0000\u001a\u0004\bC\u0010-R\u0011\u0010D\u001a\u00020E¢\u0006\b\n\u0000\u001a\u0004\bF\u0010GR\u0013\u0010H\u001a\u00020I8G¢\u0006\b\n\u0000\u001a\u0004\bH\u0010JR\u0011\u0010K\u001a\u00020L8G¢\u0006\u0006\u001a\u0004\bK\u0010MR\u0010\u0010N\u001a\u0004\u0018\u00010LX\u0082\u0004¢\u0006\u0002\n\u0000R\u0013\u0010O\u001a\u00020\u000f8G¢\u0006\b\n\u0000\u001a\u0004\bO\u0010\u0010R\u0015\u0010P\u001a\u0004\u0018\u00010Q8G¢\u0006\b\n\u0000\u001a\u0004\bP\u0010R¨\u0006z"}, d2 = {"Lokhttp3/OkHttpClient;", "", "Lokhttp3/Call$Factory;", "Lokhttp3/WebSocket$Factory;", "()V", "builder", "Lokhttp3/OkHttpClient$Builder;", "(Lokhttp3/OkHttpClient$Builder;)V", "authenticator", "Lokhttp3/Authenticator;", "()Lokhttp3/Authenticator;", "cache", "Lokhttp3/Cache;", "()Lokhttp3/Cache;", "callTimeoutMillis", "", "()I", "certificateChainCleaner", "Lokhttp3/internal/tls/CertificateChainCleaner;", "()Lokhttp3/internal/tls/CertificateChainCleaner;", "certificatePinner", "Lokhttp3/CertificatePinner;", "()Lokhttp3/CertificatePinner;", "connectTimeoutMillis", "connectionPool", "Lokhttp3/ConnectionPool;", "()Lokhttp3/ConnectionPool;", "connectionSpecs", "", "Lokhttp3/ConnectionSpec;", "()Ljava/util/List;", "cookieJar", "Lokhttp3/CookieJar;", "()Lokhttp3/CookieJar;", "dispatcher", "Lokhttp3/Dispatcher;", "()Lokhttp3/Dispatcher;", SentryOkHttpEventListener.DNS_EVENT, "Lokhttp3/Dns;", "()Lokhttp3/Dns;", "eventListenerFactory", "Lokhttp3/EventListener$Factory;", "()Lokhttp3/EventListener$Factory;", "followRedirects", "", "()Z", "followSslRedirects", "hostnameVerifier", "Ljavax/net/ssl/HostnameVerifier;", "()Ljavax/net/ssl/HostnameVerifier;", "interceptors", "Lokhttp3/Interceptor;", "minWebSocketMessageToCompress", "", "()J", "networkInterceptors", "pingIntervalMillis", "protocols", "Lokhttp3/Protocol;", "proxy", "Ljava/net/Proxy;", "()Ljava/net/Proxy;", "proxyAuthenticator", "proxySelector", "Ljava/net/ProxySelector;", "()Ljava/net/ProxySelector;", "readTimeoutMillis", "retryOnConnectionFailure", "routeDatabase", "Lokhttp3/internal/connection/RouteDatabase;", "getRouteDatabase", "()Lokhttp3/internal/connection/RouteDatabase;", "socketFactory", "Ljavax/net/SocketFactory;", "()Ljavax/net/SocketFactory;", "sslSocketFactory", "Ljavax/net/ssl/SSLSocketFactory;", "()Ljavax/net/ssl/SSLSocketFactory;", "sslSocketFactoryOrNull", "writeTimeoutMillis", "x509TrustManager", "Ljavax/net/ssl/X509TrustManager;", "()Ljavax/net/ssl/X509TrustManager;", "-deprecated_authenticator", "-deprecated_cache", "-deprecated_callTimeoutMillis", "-deprecated_certificatePinner", "-deprecated_connectTimeoutMillis", "-deprecated_connectionPool", "-deprecated_connectionSpecs", "-deprecated_cookieJar", "-deprecated_dispatcher", "-deprecated_dns", "-deprecated_eventListenerFactory", "-deprecated_followRedirects", "-deprecated_followSslRedirects", "-deprecated_hostnameVerifier", "-deprecated_interceptors", "-deprecated_networkInterceptors", "newBuilder", "newCall", "Lokhttp3/Call;", SentryBaseEvent.JsonKeys.REQUEST, "Lokhttp3/Request;", "newWebSocket", "Lokhttp3/WebSocket;", "listener", "Lokhttp3/WebSocketListener;", "-deprecated_pingIntervalMillis", "-deprecated_protocols", "-deprecated_proxy", "-deprecated_proxyAuthenticator", "-deprecated_proxySelector", "-deprecated_readTimeoutMillis", "-deprecated_retryOnConnectionFailure", "-deprecated_socketFactory", "-deprecated_sslSocketFactory", "verifyClientState", "", "-deprecated_writeTimeoutMillis", "Builder", "Companion", "okhttp"}, k = 1, mv = {1, 4, 0})
/* loaded from: classes3.dex */
public class OkHttpClient implements Cloneable, Call.Factory, WebSocket.Factory {
private final Authenticator authenticator;
private final Cache cache;
private final int callTimeoutMillis;
private final CertificateChainCleaner certificateChainCleaner;
private final CertificatePinner certificatePinner;
private final int connectTimeoutMillis;
private final ConnectionPool connectionPool;
private final List<ConnectionSpec> connectionSpecs;
private final CookieJar cookieJar;
private final Dispatcher dispatcher;
private final Dns dns;
private final EventListener.Factory eventListenerFactory;
private final boolean followRedirects;
private final boolean followSslRedirects;
private final HostnameVerifier hostnameVerifier;
private final List<Interceptor> interceptors;
private final long minWebSocketMessageToCompress;
private final List<Interceptor> networkInterceptors;
private final int pingIntervalMillis;
private final List<Protocol> protocols;
private final Proxy proxy;
private final Authenticator proxyAuthenticator;
private final ProxySelector proxySelector;
private final int readTimeoutMillis;
private final boolean retryOnConnectionFailure;
private final RouteDatabase routeDatabase;
private final SocketFactory socketFactory;
private final SSLSocketFactory sslSocketFactoryOrNull;
private final int writeTimeoutMillis;
private final X509TrustManager x509TrustManager;
/* renamed from: Companion, reason: from kotlin metadata */
public static final Companion INSTANCE = new Companion(null);
private static final List<Protocol> DEFAULT_PROTOCOLS = Util.immutableListOf(Protocol.HTTP_2, Protocol.HTTP_1_1);
private static final List<ConnectionSpec> DEFAULT_CONNECTION_SPECS = Util.immutableListOf(ConnectionSpec.MODERN_TLS, ConnectionSpec.CLEARTEXT);
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "authenticator", imports = {}))
/* renamed from: -deprecated_authenticator, reason: not valid java name and from getter */
public final Authenticator getAuthenticator() {
return this.authenticator;
}
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "cache", imports = {}))
/* renamed from: -deprecated_cache, reason: not valid java name and from getter */
public final Cache getCache() {
return this.cache;
}
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "callTimeoutMillis", imports = {}))
/* renamed from: -deprecated_callTimeoutMillis, reason: not valid java name and from getter */
public final int getCallTimeoutMillis() {
return this.callTimeoutMillis;
}
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "certificatePinner", imports = {}))
/* renamed from: -deprecated_certificatePinner, reason: not valid java name and from getter */
public final CertificatePinner getCertificatePinner() {
return this.certificatePinner;
}
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "connectTimeoutMillis", imports = {}))
/* renamed from: -deprecated_connectTimeoutMillis, reason: not valid java name and from getter */
public final int getConnectTimeoutMillis() {
return this.connectTimeoutMillis;
}
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "connectionPool", imports = {}))
/* renamed from: -deprecated_connectionPool, reason: not valid java name and from getter */
public final ConnectionPool getConnectionPool() {
return this.connectionPool;
}
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "connectionSpecs", imports = {}))
/* renamed from: -deprecated_connectionSpecs, reason: not valid java name */
public final List<ConnectionSpec> m7360deprecated_connectionSpecs() {
return this.connectionSpecs;
}
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "cookieJar", imports = {}))
/* renamed from: -deprecated_cookieJar, reason: not valid java name and from getter */
public final CookieJar getCookieJar() {
return this.cookieJar;
}
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "dispatcher", imports = {}))
/* renamed from: -deprecated_dispatcher, reason: not valid java name and from getter */
public final Dispatcher getDispatcher() {
return this.dispatcher;
}
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = SentryOkHttpEventListener.DNS_EVENT, imports = {}))
/* renamed from: -deprecated_dns, reason: not valid java name and from getter */
public final Dns getDns() {
return this.dns;
}
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "eventListenerFactory", imports = {}))
/* renamed from: -deprecated_eventListenerFactory, reason: not valid java name and from getter */
public final EventListener.Factory getEventListenerFactory() {
return this.eventListenerFactory;
}
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "followRedirects", imports = {}))
/* renamed from: -deprecated_followRedirects, reason: not valid java name and from getter */
public final boolean getFollowRedirects() {
return this.followRedirects;
}
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "followSslRedirects", imports = {}))
/* renamed from: -deprecated_followSslRedirects, reason: not valid java name and from getter */
public final boolean getFollowSslRedirects() {
return this.followSslRedirects;
}
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "hostnameVerifier", imports = {}))
/* renamed from: -deprecated_hostnameVerifier, reason: not valid java name and from getter */
public final HostnameVerifier getHostnameVerifier() {
return this.hostnameVerifier;
}
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "interceptors", imports = {}))
/* renamed from: -deprecated_interceptors, reason: not valid java name */
public final List<Interceptor> m7368deprecated_interceptors() {
return this.interceptors;
}
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "networkInterceptors", imports = {}))
/* renamed from: -deprecated_networkInterceptors, reason: not valid java name */
public final List<Interceptor> m7369deprecated_networkInterceptors() {
return this.networkInterceptors;
}
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "pingIntervalMillis", imports = {}))
/* renamed from: -deprecated_pingIntervalMillis, reason: not valid java name and from getter */
public final int getPingIntervalMillis() {
return this.pingIntervalMillis;
}
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "protocols", imports = {}))
/* renamed from: -deprecated_protocols, reason: not valid java name */
public final List<Protocol> m7371deprecated_protocols() {
return this.protocols;
}
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "proxy", imports = {}))
/* renamed from: -deprecated_proxy, reason: not valid java name and from getter */
public final Proxy getProxy() {
return this.proxy;
}
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "proxyAuthenticator", imports = {}))
/* renamed from: -deprecated_proxyAuthenticator, reason: not valid java name and from getter */
public final Authenticator getProxyAuthenticator() {
return this.proxyAuthenticator;
}
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "proxySelector", imports = {}))
/* renamed from: -deprecated_proxySelector, reason: not valid java name and from getter */
public final ProxySelector getProxySelector() {
return this.proxySelector;
}
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "readTimeoutMillis", imports = {}))
/* renamed from: -deprecated_readTimeoutMillis, reason: not valid java name and from getter */
public final int getReadTimeoutMillis() {
return this.readTimeoutMillis;
}
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "retryOnConnectionFailure", imports = {}))
/* renamed from: -deprecated_retryOnConnectionFailure, reason: not valid java name and from getter */
public final boolean getRetryOnConnectionFailure() {
return this.retryOnConnectionFailure;
}
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "socketFactory", imports = {}))
/* renamed from: -deprecated_socketFactory, reason: not valid java name and from getter */
public final SocketFactory getSocketFactory() {
return this.socketFactory;
}
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "writeTimeoutMillis", imports = {}))
/* renamed from: -deprecated_writeTimeoutMillis, reason: not valid java name and from getter */
public final int getWriteTimeoutMillis() {
return this.writeTimeoutMillis;
}
public final Authenticator authenticator() {
return this.authenticator;
}
public final Cache cache() {
return this.cache;
}
public final int callTimeoutMillis() {
return this.callTimeoutMillis;
}
/* renamed from: certificateChainCleaner, reason: from getter */
public final CertificateChainCleaner getCertificateChainCleaner() {
return this.certificateChainCleaner;
}
public final CertificatePinner certificatePinner() {
return this.certificatePinner;
}
public final int connectTimeoutMillis() {
return this.connectTimeoutMillis;
}
public final ConnectionPool connectionPool() {
return this.connectionPool;
}
public final List<ConnectionSpec> connectionSpecs() {
return this.connectionSpecs;
}
public final CookieJar cookieJar() {
return this.cookieJar;
}
public final Dispatcher dispatcher() {
return this.dispatcher;
}
public final Dns dns() {
return this.dns;
}
public final EventListener.Factory eventListenerFactory() {
return this.eventListenerFactory;
}
public final boolean followRedirects() {
return this.followRedirects;
}
public final boolean followSslRedirects() {
return this.followSslRedirects;
}
public final RouteDatabase getRouteDatabase() {
return this.routeDatabase;
}
public final HostnameVerifier hostnameVerifier() {
return this.hostnameVerifier;
}
public final List<Interceptor> interceptors() {
return this.interceptors;
}
/* renamed from: minWebSocketMessageToCompress, reason: from getter */
public final long getMinWebSocketMessageToCompress() {
return this.minWebSocketMessageToCompress;
}
public final List<Interceptor> networkInterceptors() {
return this.networkInterceptors;
}
public final int pingIntervalMillis() {
return this.pingIntervalMillis;
}
public final List<Protocol> protocols() {
return this.protocols;
}
public final Proxy proxy() {
return this.proxy;
}
public final Authenticator proxyAuthenticator() {
return this.proxyAuthenticator;
}
public final ProxySelector proxySelector() {
return this.proxySelector;
}
public final int readTimeoutMillis() {
return this.readTimeoutMillis;
}
public final boolean retryOnConnectionFailure() {
return this.retryOnConnectionFailure;
}
public final SocketFactory socketFactory() {
return this.socketFactory;
}
public final int writeTimeoutMillis() {
return this.writeTimeoutMillis;
}
/* renamed from: x509TrustManager, reason: from getter */
public final X509TrustManager getX509TrustManager() {
return this.x509TrustManager;
}
public OkHttpClient(Builder builder) {
NullProxySelector proxySelector;
Intrinsics.checkNotNullParameter(builder, "builder");
this.dispatcher = builder.getDispatcher();
this.connectionPool = builder.getConnectionPool();
this.interceptors = Util.toImmutableList(builder.getInterceptors$okhttp());
this.networkInterceptors = Util.toImmutableList(builder.getNetworkInterceptors$okhttp());
this.eventListenerFactory = builder.getEventListenerFactory();
this.retryOnConnectionFailure = builder.getRetryOnConnectionFailure();
this.authenticator = builder.getAuthenticator();
this.followRedirects = builder.getFollowRedirects();
this.followSslRedirects = builder.getFollowSslRedirects();
this.cookieJar = builder.getCookieJar();
this.cache = builder.getCache();
this.dns = builder.getDns();
this.proxy = builder.getProxy();
if (builder.getProxy() != null) {
proxySelector = NullProxySelector.INSTANCE;
} else {
proxySelector = builder.getProxySelector();
proxySelector = proxySelector == null ? ProxySelector.getDefault() : proxySelector;
if (proxySelector == null) {
proxySelector = NullProxySelector.INSTANCE;
}
}
this.proxySelector = proxySelector;
this.proxyAuthenticator = builder.getProxyAuthenticator();
this.socketFactory = builder.getSocketFactory();
List<ConnectionSpec> connectionSpecs$okhttp = builder.getConnectionSpecs$okhttp();
this.connectionSpecs = connectionSpecs$okhttp;
this.protocols = builder.getProtocols$okhttp();
this.hostnameVerifier = builder.getHostnameVerifier();
this.callTimeoutMillis = builder.getCallTimeout();
this.connectTimeoutMillis = builder.getConnectTimeout();
this.readTimeoutMillis = builder.getReadTimeout();
this.writeTimeoutMillis = builder.getWriteTimeout();
this.pingIntervalMillis = builder.getPingInterval();
this.minWebSocketMessageToCompress = builder.getMinWebSocketMessageToCompress();
RouteDatabase routeDatabase = builder.getRouteDatabase();
this.routeDatabase = routeDatabase == null ? new RouteDatabase() : routeDatabase;
List<ConnectionSpec> list = connectionSpecs$okhttp;
if (!(list instanceof Collection) || !list.isEmpty()) {
Iterator<T> it = list.iterator();
while (it.hasNext()) {
if (((ConnectionSpec) it.next()).getIsTls()) {
if (builder.getSslSocketFactoryOrNull() != null) {
this.sslSocketFactoryOrNull = builder.getSslSocketFactoryOrNull();
CertificateChainCleaner certificateChainCleaner = builder.getCertificateChainCleaner();
Intrinsics.checkNotNull(certificateChainCleaner);
this.certificateChainCleaner = certificateChainCleaner;
X509TrustManager x509TrustManagerOrNull = builder.getX509TrustManagerOrNull();
Intrinsics.checkNotNull(x509TrustManagerOrNull);
this.x509TrustManager = x509TrustManagerOrNull;
CertificatePinner certificatePinner = builder.getCertificatePinner();
Intrinsics.checkNotNull(certificateChainCleaner);
this.certificatePinner = certificatePinner.withCertificateChainCleaner$okhttp(certificateChainCleaner);
} else {
X509TrustManager platformTrustManager = Platform.INSTANCE.get().platformTrustManager();
this.x509TrustManager = platformTrustManager;
Platform platform = Platform.INSTANCE.get();
Intrinsics.checkNotNull(platformTrustManager);
this.sslSocketFactoryOrNull = platform.newSslSocketFactory(platformTrustManager);
CertificateChainCleaner.Companion companion = CertificateChainCleaner.INSTANCE;
Intrinsics.checkNotNull(platformTrustManager);
CertificateChainCleaner certificateChainCleaner2 = companion.get(platformTrustManager);
this.certificateChainCleaner = certificateChainCleaner2;
CertificatePinner certificatePinner2 = builder.getCertificatePinner();
Intrinsics.checkNotNull(certificateChainCleaner2);
this.certificatePinner = certificatePinner2.withCertificateChainCleaner$okhttp(certificateChainCleaner2);
}
verifyClientState();
}
}
}
this.sslSocketFactoryOrNull = null;
this.certificateChainCleaner = null;
this.x509TrustManager = null;
this.certificatePinner = CertificatePinner.DEFAULT;
verifyClientState();
}
public Object clone() {
return super.clone();
}
public final SSLSocketFactory sslSocketFactory() {
SSLSocketFactory sSLSocketFactory = this.sslSocketFactoryOrNull;
if (sSLSocketFactory != null) {
return sSLSocketFactory;
}
throw new IllegalStateException("CLEARTEXT-only client");
}
public OkHttpClient() {
this(new Builder());
}
private final void verifyClientState() {
if (this.interceptors == null) {
throw new NullPointerException("null cannot be cast to non-null type kotlin.collections.List<okhttp3.Interceptor?>");
}
if (!(!r0.contains(null))) {
throw new IllegalStateException(("Null interceptor: " + this.interceptors).toString());
}
if (this.networkInterceptors == null) {
throw new NullPointerException("null cannot be cast to non-null type kotlin.collections.List<okhttp3.Interceptor?>");
}
if (!(!r0.contains(null))) {
throw new IllegalStateException(("Null network interceptor: " + this.networkInterceptors).toString());
}
List<ConnectionSpec> list = this.connectionSpecs;
if (!(list instanceof Collection) || !list.isEmpty()) {
Iterator<T> it = list.iterator();
while (it.hasNext()) {
if (((ConnectionSpec) it.next()).getIsTls()) {
if (this.sslSocketFactoryOrNull == null) {
throw new IllegalStateException("sslSocketFactory == null".toString());
}
if (this.certificateChainCleaner == null) {
throw new IllegalStateException("certificateChainCleaner == null".toString());
}
if (this.x509TrustManager == null) {
throw new IllegalStateException("x509TrustManager == null".toString());
}
return;
}
}
}
if (!(this.sslSocketFactoryOrNull == null)) {
throw new IllegalStateException("Check failed.".toString());
}
if (!(this.certificateChainCleaner == null)) {
throw new IllegalStateException("Check failed.".toString());
}
if (!(this.x509TrustManager == null)) {
throw new IllegalStateException("Check failed.".toString());
}
if (!Intrinsics.areEqual(this.certificatePinner, CertificatePinner.DEFAULT)) {
throw new IllegalStateException("Check failed.".toString());
}
}
@Override // okhttp3.Call.Factory
public Call newCall(Request request) {
Intrinsics.checkNotNullParameter(request, "request");
return new RealCall(this, request, false);
}
@Override // okhttp3.WebSocket.Factory
public WebSocket newWebSocket(Request request, WebSocketListener listener) {
Intrinsics.checkNotNullParameter(request, "request");
Intrinsics.checkNotNullParameter(listener, "listener");
RealWebSocket realWebSocket = new RealWebSocket(TaskRunner.INSTANCE, request, listener, new Random(), this.pingIntervalMillis, null, this.minWebSocketMessageToCompress);
realWebSocket.connect(this);
return realWebSocket;
}
public Builder newBuilder() {
return new Builder(this);
}
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "sslSocketFactory", imports = {}))
/* renamed from: -deprecated_sslSocketFactory, reason: not valid java name */
public final SSLSocketFactory m7378deprecated_sslSocketFactory() {
return sslSocketFactory();
}
/* compiled from: OkHttpClient.kt */
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000ø\u0001\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\b\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\b\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\u000b\n\u0002\b\b\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010!\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\t\n\u0002\b\n\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\b\n\u0002\u0018\u0002\n\u0002\b\u000b\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\b\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0006\u0018\u00002\u00020\u0001B\u000f\b\u0010\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004B\u0005¢\u0006\u0002\u0010\u0005J?\u0010\u009e\u0001\u001a\u00020\u00002*\b\u0004\u0010\u009f\u0001\u001a#\u0012\u0017\u0012\u00150¡\u0001¢\u0006\u000f\\u0001\u0012\n\\u0001\u0012\u0005\b\b(¤\u0001\u0012\u0005\u0012\u00030¥\u00010 \u0001H\u0087\\u0001\u0000¢\u0006\u0003\\u0001J\u0010\u0010\u009e\u0001\u001a\u00020\u00002\u0007\u0010§\u0001\u001a\u00020]J?\u0010¨\u0001\u001a\u00020\u00002*\b\u0004\u0010\u009f\u0001\u001a#\u0012\u0017\u0012\u00150¡\u0001¢\u0006\u000f\\u0001\u0012\n\\u0001\u0012\u0005\b\b(¤\u0001\u0012\u0005\u0012\u00030¥\u00010 \u0001H\u0087\\u0001\u0000¢\u0006\u0003\\u0001J\u0010\u0010¨\u0001\u001a\u00020\u00002\u0007\u0010§\u0001\u001a\u00020]J\u000e\u0010\u0006\u001a\u00020\u00002\u0006\u0010\u0006\u001a\u00020\u0007J\u0007\u0010ª\u0001\u001a\u00020\u0003J\u0010\u0010\f\u001a\u00020\u00002\b\u0010\f\u001a\u0004\u0018\u00010\rJ\u0012\u0010\u0012\u001a\u00020\u00002\b\u0010«\u0001\u001a\u00030¬\u0001H\u0007J\u0019\u0010\u0012\u001a\u00020\u00002\u0007\u0010\u00ad\u0001\u001a\u00020`2\b\u0010®\u0001\u001a\u00030¯\u0001J\u000e\u0010\u001e\u001a\u00020\u00002\u0006\u0010\u001e\u001a\u00020\u001fJ\u0012\u0010$\u001a\u00020\u00002\b\u0010«\u0001\u001a\u00030¬\u0001H\u0007J\u0019\u0010$\u001a\u00020\u00002\u0007\u0010\u00ad\u0001\u001a\u00020`2\b\u0010®\u0001\u001a\u00030¯\u0001J\u000e\u0010'\u001a\u00020\u00002\u0006\u0010'\u001a\u00020(J\u0014\u0010-\u001a\u00020\u00002\f\u0010-\u001a\b\u0012\u0004\u0012\u00020/0.J\u000e\u00104\u001a\u00020\u00002\u0006\u00104\u001a\u000205J\u000e\u0010:\u001a\u00020\u00002\u0006\u0010:\u001a\u00020;J\u000e\u0010@\u001a\u00020\u00002\u0006\u0010@\u001a\u00020AJ\u0011\u0010°\u0001\u001a\u00020\u00002\b\u0010°\u0001\u001a\u00030±\u0001J\u000e\u0010F\u001a\u00020\u00002\u0006\u0010F\u001a\u00020GJ\u000e\u0010L\u001a\u00020\u00002\u0006\u0010L\u001a\u00020MJ\u000f\u0010R\u001a\u00020\u00002\u0007\u0010²\u0001\u001a\u00020MJ\u000e\u0010U\u001a\u00020\u00002\u0006\u0010U\u001a\u00020VJ\f\u0010[\u001a\b\u0012\u0004\u0012\u00020]0\\J\u000f\u0010_\u001a\u00020\u00002\u0007\u0010³\u0001\u001a\u00020`J\f\u0010e\u001a\b\u0012\u0004\u0012\u00020]0\\J\u0012\u0010g\u001a\u00020\u00002\b\u0010«\u0001\u001a\u00030¬\u0001H\u0007J\u0019\u0010g\u001a\u00020\u00002\u0007\u0010´\u0001\u001a\u00020`2\b\u0010®\u0001\u001a\u00030¯\u0001J\u0014\u0010j\u001a\u00020\u00002\f\u0010j\u001a\b\u0012\u0004\u0012\u00020k0.J\u0010\u0010n\u001a\u00020\u00002\b\u0010n\u001a\u0004\u0018\u00010oJ\u000e\u0010t\u001a\u00020\u00002\u0006\u0010t\u001a\u00020\u0007J\u000e\u0010w\u001a\u00020\u00002\u0006\u0010w\u001a\u00020xJ\u0012\u0010}\u001a\u00020\u00002\b\u0010«\u0001\u001a\u00030¬\u0001H\u0007J\u0019\u0010}\u001a\u00020\u00002\u0007\u0010\u00ad\u0001\u001a\u00020`2\b\u0010®\u0001\u001a\u00030¯\u0001J\u0010\u0010\u0080\u0001\u001a\u00020\u00002\u0007\u0010\u0080\u0001\u001a\u00020MJ\u0011\u0010\u0089\u0001\u001a\u00020\u00002\b\u0010\u0089\u0001\u001a\u00030\u008a\u0001J\u0013\u0010µ\u0001\u001a\u00020\u00002\b\u0010µ\u0001\u001a\u00030\u0090\u0001H\u0007J\u001b\u0010µ\u0001\u001a\u00020\u00002\b\u0010µ\u0001\u001a\u00030\u0090\u00012\b\u0010¶\u0001\u001a\u00030\u0099\u0001J\u0013\u0010\u0095\u0001\u001a\u00020\u00002\b\u0010«\u0001\u001a\u00030¬\u0001H\u0007J\u001a\u0010\u0095\u0001\u001a\u00020\u00002\u0007\u0010\u00ad\u0001\u001a\u00020`2\b\u0010®\u0001\u001a\u00030¯\u0001R\u001a\u0010\u0006\u001a\u00020\u0007X\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\b\u0010\t\"\u0004\b\n\u0010\u000bR\u001c\u0010\f\u001a\u0004\u0018\u00010\rX\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u000e\u0010\u000f\"\u0004\b\u0010\u0010\u0011R\u001a\u0010\u0012\u001a\u00020\u0013X\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0014\u0010\u0015\"\u0004\b\u0016\u0010\u0017R\u001c\u0010\u0018\u001a\u0004\u0018\u00010\u0019X\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u001a\u0010\u001b\"\u0004\b\u001c\u0010\u001dR\u001a\u0010\u001e\u001a\u00020\u001fX\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b \u0010!\"\u0004\b\"\u0010#R\u001a\u0010$\u001a\u00020\u0013X\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b%\u0010\u0015\"\u0004\b&\u0010\u0017R\u001a\u0010'\u001a\u00020(X\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b)\u0010*\"\u0004\b+\u0010,R \u0010-\u001a\b\u0012\u0004\u0012\u00020/0.X\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b0\u00101\"\u0004\b2\u00103R\u001a\u00104\u001a\u000205X\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b6\u00107\"\u0004\b8\u00109R\u001a\u0010:\u001a\u00020;X\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b<\u0010=\"\u0004\b>\u0010?R\u001a\u0010@\u001a\u00020AX\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\bB\u0010C\"\u0004\bD\u0010ER\u001a\u0010F\u001a\u00020GX\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\bH\u0010I\"\u0004\bJ\u0010KR\u001a\u0010L\u001a\u00020MX\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\bN\u0010O\"\u0004\bP\u0010QR\u001a\u0010R\u001a\u00020MX\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\bS\u0010O\"\u0004\bT\u0010QR\u001a\u0010U\u001a\u00020VX\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\bW\u0010X\"\u0004\bY\u0010ZR\u001a\u0010[\u001a\b\u0012\u0004\u0012\u00020]0\\X\u0080\u0004¢\u0006\b\n\u0000\u001a\u0004\b^\u00101R\u001a\u0010_\u001a\u00020`X\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\ba\u0010b\"\u0004\bc\u0010dR\u001a\u0010e\u001a\b\u0012\u0004\u0012\u00020]0\\X\u0080\u0004¢\u0006\b\n\u0000\u001a\u0004\bf\u00101R\u001a\u0010g\u001a\u00020\u0013X\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\bh\u0010\u0015\"\u0004\bi\u0010\u0017R \u0010j\u001a\b\u0012\u0004\u0012\u00020k0.X\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\bl\u00101\"\u0004\bm\u00103R\u001c\u0010n\u001a\u0004\u0018\u00010oX\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\bp\u0010q\"\u0004\br\u0010sR\u001a\u0010t\u001a\u00020\u0007X\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\bu\u0010\t\"\u0004\bv\u0010\u000bR\u001c\u0010w\u001a\u0004\u0018\u00010xX\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\by\u0010z\"\u0004\b{\u0010|R\u001a\u0010}\u001a\u00020\u0013X\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b~\u0010\u0015\"\u0004\b\u007f\u0010\u0017R\u001d\u0010\u0080\u0001\u001a\u00020MX\u0080\u000e¢\u0006\u0010\n\u0000\u001a\u0005\b\u0081\u0001\u0010O\"\u0005\b\u0082\u0001\u0010QR\"\u0010\u0083\u0001\u001a\u0005\u0018\u00010\u0084\u0001X\u0080\u000e¢\u0006\u0012\n\u0000\u001a\u0006\b\u0085\u0001\u0010\u0086\u0001\"\u0006\b\u0087\u0001\u0010\u0088\u0001R \u0010\u0089\u0001\u001a\u00030\u008a\u0001X\u0080\u000e¢\u0006\u0012\n\u0000\u001a\u0006\b\u008b\u0001\u0010\u008c\u0001\"\u0006\b\u008d\u0001\u0010\u008e\u0001R\"\u0010\u008f\u0001\u001a\u0005\u0018\u00010\u0090\u0001X\u0080\u000e¢\u0006\u0012\n\u0000\u001a\u0006\b\u0091\u0001\u0010\u0092\u0001\"\u0006\b\u0093\u0001\u0010\u0094\u0001R\u001d\u0010\u0095\u0001\u001a\u00020\u0013X\u0080\u000e¢\u0006\u0010\n\u0000\u001a\u0005\b\u0096\u0001\u0010\u0015\"\u0005\b\u0097\u0001\u0010\u0017R\"\u0010\u0098\u0001\u001a\u0005\u0018\u00010\u0099\u0001X\u0080\u000e¢\u0006\u0012\n\u0000\u001a\u0006\b\u009a\u0001\u0010\u009b\u0001\"\u0006\b\u009c\u0001\u0010\u009d\u0001\u0082\u0002\u0007\n\u0005\b\u009920\u0001¨\u0006·\u0001"}, d2 = {"Lokhttp3/OkHttpClient$Builder;", "", "okHttpClient", "Lokhttp3/OkHttpClient;", "(Lokhttp3/OkHttpClient;)V", "()V", "authenticator", "Lokhttp3/Authenticator;", "getAuthenticator$okhttp", "()Lokhttp3/Authenticator;", "setAuthenticator$okhttp", "(Lokhttp3/Authenticator;)V", "cache", "Lokhttp3/Cache;", "getCache$okhttp", "()Lokhttp3/Cache;", "setCache$okhttp", "(Lokhttp3/Cache;)V", "callTimeout", "", "getCallTimeout$okhttp", "()I", "setCallTimeout$okhttp", "(I)V", "certificateChainCleaner", "Lokhttp3/internal/tls/CertificateChainCleaner;", "getCertificateChainCleaner$okhttp", "()Lokhttp3/internal/tls/CertificateChainCleaner;", "setCertificateChainCleaner$okhttp", "(Lokhttp3/internal/tls/CertificateChainCleaner;)V", "certificatePinner", "Lokhttp3/CertificatePinner;", "getCertificatePinner$okhttp", "()Lokhttp3/CertificatePinner;", "setCertificatePinner$okhttp", "(Lokhttp3/CertificatePinner;)V", "connectTimeout", "getConnectTimeout$okhttp", "setConnectTimeout$okhttp", "connectionPool", "Lokhttp3/ConnectionPool;", "getConnectionPool$okhttp", "()Lokhttp3/ConnectionPool;", "setConnectionPool$okhttp", "(Lokhttp3/ConnectionPool;)V", "connectionSpecs", "", "Lokhttp3/ConnectionSpec;", "getConnectionSpecs$okhttp", "()Ljava/util/List;", "setConnectionSpecs$okhttp", "(Ljava/util/List;)V", "cookieJar", "Lokhttp3/CookieJar;", "getCookieJar$okhttp", "()Lokhttp3/CookieJar;", "setCookieJar$okhttp", "(Lokhttp3/CookieJar;)V", "dispatcher", "Lokhttp3/Dispatcher;", "getDispatcher$okhttp", "()Lokhttp3/Dispatcher;", "setDispatcher$okhttp", "(Lokhttp3/Dispatcher;)V", SentryOkHttpEventListener.DNS_EVENT, "Lokhttp3/Dns;", "getDns$okhttp", "()Lokhttp3/Dns;", "setDns$okhttp", "(Lokhttp3/Dns;)V", "eventListenerFactory", "Lokhttp3/EventListener$Factory;", "getEventListenerFactory$okhttp", "()Lokhttp3/EventListener$Factory;", "setEventListenerFactory$okhttp", "(Lokhttp3/EventListener$Factory;)V", "followRedirects", "", "getFollowRedirects$okhttp", "()Z", "setFollowRedirects$okhttp", "(Z)V", "followSslRedirects", "getFollowSslRedirects$okhttp", "setFollowSslRedirects$okhttp", "hostnameVerifier", "Ljavax/net/ssl/HostnameVerifier;", "getHostnameVerifier$okhttp", "()Ljavax/net/ssl/HostnameVerifier;", "setHostnameVerifier$okhttp", "(Ljavax/net/ssl/HostnameVerifier;)V", "interceptors", "", "Lokhttp3/Interceptor;", "getInterceptors$okhttp", "minWebSocketMessageToCompress", "", "getMinWebSocketMessageToCompress$okhttp", "()J", "setMinWebSocketMessageToCompress$okhttp", "(J)V", "networkInterceptors", "getNetworkInterceptors$okhttp", "pingInterval", "getPingInterval$okhttp", "setPingInterval$okhttp", "protocols", "Lokhttp3/Protocol;", "getProtocols$okhttp", "setProtocols$okhttp", "proxy", "Ljava/net/Proxy;", "getProxy$okhttp", "()Ljava/net/Proxy;", "setProxy$okhttp", "(Ljava/net/Proxy;)V", "proxyAuthenticator", "getProxyAuthenticator$okhttp", "setProxyAuthenticator$okhttp", "proxySelector", "Ljava/net/ProxySelector;", "getProxySelector$okhttp", "()Ljava/net/ProxySelector;", "setProxySelector$okhttp", "(Ljava/net/ProxySelector;)V", "readTimeout", "getReadTimeout$okhttp", "setReadTimeout$okhttp", "retryOnConnectionFailure", "getRetryOnConnectionFailure$okhttp", "setRetryOnConnectionFailure$okhttp", "routeDatabase", "Lokhttp3/internal/connection/RouteDatabase;", "getRouteDatabase$okhttp", "()Lokhttp3/internal/connection/RouteDatabase;", "setRouteDatabase$okhttp", "(Lokhttp3/internal/connection/RouteDatabase;)V", "socketFactory", "Ljavax/net/SocketFactory;", "getSocketFactory$okhttp", "()Ljavax/net/SocketFactory;", "setSocketFactory$okhttp", "(Ljavax/net/SocketFactory;)V", "sslSocketFactoryOrNull", "Ljavax/net/ssl/SSLSocketFactory;", "getSslSocketFactoryOrNull$okhttp", "()Ljavax/net/ssl/SSLSocketFactory;", "setSslSocketFactoryOrNull$okhttp", "(Ljavax/net/ssl/SSLSocketFactory;)V", "writeTimeout", "getWriteTimeout$okhttp", "setWriteTimeout$okhttp", "x509TrustManagerOrNull", "Ljavax/net/ssl/X509TrustManager;", "getX509TrustManagerOrNull$okhttp", "()Ljavax/net/ssl/X509TrustManager;", "setX509TrustManagerOrNull$okhttp", "(Ljavax/net/ssl/X509TrustManager;)V", "addInterceptor", "block", "Lkotlin/Function1;", "Lokhttp3/Interceptor$Chain;", "Lkotlin/ParameterName;", "name", "chain", "Lokhttp3/Response;", "-addInterceptor", "interceptor", "addNetworkInterceptor", "-addNetworkInterceptor", OperatingSystem.JsonKeys.BUILD, "duration", "Ljava/time/Duration;", ProfilingTraceData.TRUNCATION_REASON_TIMEOUT, "unit", "Ljava/util/concurrent/TimeUnit;", "eventListener", "Lokhttp3/EventListener;", "followProtocolRedirects", "bytes", "interval", "sslSocketFactory", "trustManager", "okhttp"}, k = 1, mv = {1, 4, 0})
/* loaded from: classes3.dex */
public static final class Builder {
private Authenticator authenticator;
private Cache cache;
private int callTimeout;
private CertificateChainCleaner certificateChainCleaner;
private CertificatePinner certificatePinner;
private int connectTimeout;
private ConnectionPool connectionPool;
private List<ConnectionSpec> connectionSpecs;
private CookieJar cookieJar;
private Dispatcher dispatcher;
private Dns dns;
private EventListener.Factory eventListenerFactory;
private boolean followRedirects;
private boolean followSslRedirects;
private HostnameVerifier hostnameVerifier;
private final List<Interceptor> interceptors;
private long minWebSocketMessageToCompress;
private final List<Interceptor> networkInterceptors;
private int pingInterval;
private List<? extends Protocol> protocols;
private Proxy proxy;
private Authenticator proxyAuthenticator;
private ProxySelector proxySelector;
private int readTimeout;
private boolean retryOnConnectionFailure;
private RouteDatabase routeDatabase;
private SocketFactory socketFactory;
private SSLSocketFactory sslSocketFactoryOrNull;
private int writeTimeout;
private X509TrustManager x509TrustManagerOrNull;
/* renamed from: getAuthenticator$okhttp, reason: from getter */
public final Authenticator getAuthenticator() {
return this.authenticator;
}
/* renamed from: getCache$okhttp, reason: from getter */
public final Cache getCache() {
return this.cache;
}
/* renamed from: getCallTimeout$okhttp, reason: from getter */
public final int getCallTimeout() {
return this.callTimeout;
}
/* renamed from: getCertificateChainCleaner$okhttp, reason: from getter */
public final CertificateChainCleaner getCertificateChainCleaner() {
return this.certificateChainCleaner;
}
/* renamed from: getCertificatePinner$okhttp, reason: from getter */
public final CertificatePinner getCertificatePinner() {
return this.certificatePinner;
}
/* renamed from: getConnectTimeout$okhttp, reason: from getter */
public final int getConnectTimeout() {
return this.connectTimeout;
}
/* renamed from: getConnectionPool$okhttp, reason: from getter */
public final ConnectionPool getConnectionPool() {
return this.connectionPool;
}
public final List<ConnectionSpec> getConnectionSpecs$okhttp() {
return this.connectionSpecs;
}
/* renamed from: getCookieJar$okhttp, reason: from getter */
public final CookieJar getCookieJar() {
return this.cookieJar;
}
/* renamed from: getDispatcher$okhttp, reason: from getter */
public final Dispatcher getDispatcher() {
return this.dispatcher;
}
/* renamed from: getDns$okhttp, reason: from getter */
public final Dns getDns() {
return this.dns;
}
/* renamed from: getEventListenerFactory$okhttp, reason: from getter */
public final EventListener.Factory getEventListenerFactory() {
return this.eventListenerFactory;
}
/* renamed from: getFollowRedirects$okhttp, reason: from getter */
public final boolean getFollowRedirects() {
return this.followRedirects;
}
/* renamed from: getFollowSslRedirects$okhttp, reason: from getter */
public final boolean getFollowSslRedirects() {
return this.followSslRedirects;
}
/* renamed from: getHostnameVerifier$okhttp, reason: from getter */
public final HostnameVerifier getHostnameVerifier() {
return this.hostnameVerifier;
}
public final List<Interceptor> getInterceptors$okhttp() {
return this.interceptors;
}
/* renamed from: getMinWebSocketMessageToCompress$okhttp, reason: from getter */
public final long getMinWebSocketMessageToCompress() {
return this.minWebSocketMessageToCompress;
}
public final List<Interceptor> getNetworkInterceptors$okhttp() {
return this.networkInterceptors;
}
/* renamed from: getPingInterval$okhttp, reason: from getter */
public final int getPingInterval() {
return this.pingInterval;
}
public final List<Protocol> getProtocols$okhttp() {
return this.protocols;
}
/* renamed from: getProxy$okhttp, reason: from getter */
public final Proxy getProxy() {
return this.proxy;
}
/* renamed from: getProxyAuthenticator$okhttp, reason: from getter */
public final Authenticator getProxyAuthenticator() {
return this.proxyAuthenticator;
}
/* renamed from: getProxySelector$okhttp, reason: from getter */
public final ProxySelector getProxySelector() {
return this.proxySelector;
}
/* renamed from: getReadTimeout$okhttp, reason: from getter */
public final int getReadTimeout() {
return this.readTimeout;
}
/* renamed from: getRetryOnConnectionFailure$okhttp, reason: from getter */
public final boolean getRetryOnConnectionFailure() {
return this.retryOnConnectionFailure;
}
/* renamed from: getRouteDatabase$okhttp, reason: from getter */
public final RouteDatabase getRouteDatabase() {
return this.routeDatabase;
}
/* renamed from: getSocketFactory$okhttp, reason: from getter */
public final SocketFactory getSocketFactory() {
return this.socketFactory;
}
/* renamed from: getSslSocketFactoryOrNull$okhttp, reason: from getter */
public final SSLSocketFactory getSslSocketFactoryOrNull() {
return this.sslSocketFactoryOrNull;
}
/* renamed from: getWriteTimeout$okhttp, reason: from getter */
public final int getWriteTimeout() {
return this.writeTimeout;
}
/* renamed from: getX509TrustManagerOrNull$okhttp, reason: from getter */
public final X509TrustManager getX509TrustManagerOrNull() {
return this.x509TrustManagerOrNull;
}
public final List<Interceptor> interceptors() {
return this.interceptors;
}
public final List<Interceptor> networkInterceptors() {
return this.networkInterceptors;
}
public final void setAuthenticator$okhttp(Authenticator authenticator) {
Intrinsics.checkNotNullParameter(authenticator, "<set-?>");
this.authenticator = authenticator;
}
public final void setCache$okhttp(Cache cache) {
this.cache = cache;
}
public final void setCallTimeout$okhttp(int i) {
this.callTimeout = i;
}
public final void setCertificateChainCleaner$okhttp(CertificateChainCleaner certificateChainCleaner) {
this.certificateChainCleaner = certificateChainCleaner;
}
public final void setCertificatePinner$okhttp(CertificatePinner certificatePinner) {
Intrinsics.checkNotNullParameter(certificatePinner, "<set-?>");
this.certificatePinner = certificatePinner;
}
public final void setConnectTimeout$okhttp(int i) {
this.connectTimeout = i;
}
public final void setConnectionPool$okhttp(ConnectionPool connectionPool) {
Intrinsics.checkNotNullParameter(connectionPool, "<set-?>");
this.connectionPool = connectionPool;
}
public final void setConnectionSpecs$okhttp(List<ConnectionSpec> list) {
Intrinsics.checkNotNullParameter(list, "<set-?>");
this.connectionSpecs = list;
}
public final void setCookieJar$okhttp(CookieJar cookieJar) {
Intrinsics.checkNotNullParameter(cookieJar, "<set-?>");
this.cookieJar = cookieJar;
}
public final void setDispatcher$okhttp(Dispatcher dispatcher) {
Intrinsics.checkNotNullParameter(dispatcher, "<set-?>");
this.dispatcher = dispatcher;
}
public final void setDns$okhttp(Dns dns) {
Intrinsics.checkNotNullParameter(dns, "<set-?>");
this.dns = dns;
}
public final void setEventListenerFactory$okhttp(EventListener.Factory factory) {
Intrinsics.checkNotNullParameter(factory, "<set-?>");
this.eventListenerFactory = factory;
}
public final void setFollowRedirects$okhttp(boolean z) {
this.followRedirects = z;
}
public final void setFollowSslRedirects$okhttp(boolean z) {
this.followSslRedirects = z;
}
public final void setHostnameVerifier$okhttp(HostnameVerifier hostnameVerifier) {
Intrinsics.checkNotNullParameter(hostnameVerifier, "<set-?>");
this.hostnameVerifier = hostnameVerifier;
}
public final void setMinWebSocketMessageToCompress$okhttp(long j) {
this.minWebSocketMessageToCompress = j;
}
public final void setPingInterval$okhttp(int i) {
this.pingInterval = i;
}
public final void setProtocols$okhttp(List<? extends Protocol> list) {
Intrinsics.checkNotNullParameter(list, "<set-?>");
this.protocols = list;
}
public final void setProxy$okhttp(Proxy proxy) {
this.proxy = proxy;
}
public final void setProxyAuthenticator$okhttp(Authenticator authenticator) {
Intrinsics.checkNotNullParameter(authenticator, "<set-?>");
this.proxyAuthenticator = authenticator;
}
public final void setProxySelector$okhttp(ProxySelector proxySelector) {
this.proxySelector = proxySelector;
}
public final void setReadTimeout$okhttp(int i) {
this.readTimeout = i;
}
public final void setRetryOnConnectionFailure$okhttp(boolean z) {
this.retryOnConnectionFailure = z;
}
public final void setRouteDatabase$okhttp(RouteDatabase routeDatabase) {
this.routeDatabase = routeDatabase;
}
public final void setSocketFactory$okhttp(SocketFactory socketFactory) {
Intrinsics.checkNotNullParameter(socketFactory, "<set-?>");
this.socketFactory = socketFactory;
}
public final void setSslSocketFactoryOrNull$okhttp(SSLSocketFactory sSLSocketFactory) {
this.sslSocketFactoryOrNull = sSLSocketFactory;
}
public final void setWriteTimeout$okhttp(int i) {
this.writeTimeout = i;
}
public final void setX509TrustManagerOrNull$okhttp(X509TrustManager x509TrustManager) {
this.x509TrustManagerOrNull = x509TrustManager;
}
public Builder() {
this.dispatcher = new Dispatcher();
this.connectionPool = new ConnectionPool();
this.interceptors = new ArrayList();
this.networkInterceptors = new ArrayList();
this.eventListenerFactory = Util.asFactory(EventListener.NONE);
this.retryOnConnectionFailure = true;
this.authenticator = Authenticator.NONE;
this.followRedirects = true;
this.followSslRedirects = true;
this.cookieJar = CookieJar.NO_COOKIES;
this.dns = Dns.SYSTEM;
this.proxyAuthenticator = Authenticator.NONE;
SocketFactory socketFactory = SocketFactory.getDefault();
Intrinsics.checkNotNullExpressionValue(socketFactory, "SocketFactory.getDefault()");
this.socketFactory = socketFactory;
this.connectionSpecs = OkHttpClient.INSTANCE.getDEFAULT_CONNECTION_SPECS$okhttp();
this.protocols = OkHttpClient.INSTANCE.getDEFAULT_PROTOCOLS$okhttp();
this.hostnameVerifier = OkHostnameVerifier.INSTANCE;
this.certificatePinner = CertificatePinner.DEFAULT;
this.connectTimeout = 10000;
this.readTimeout = 10000;
this.writeTimeout = 10000;
this.minWebSocketMessageToCompress = RealWebSocket.DEFAULT_MINIMUM_DEFLATE_SIZE;
}
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
public Builder(OkHttpClient okHttpClient) {
this();
Intrinsics.checkNotNullParameter(okHttpClient, "okHttpClient");
this.dispatcher = okHttpClient.dispatcher();
this.connectionPool = okHttpClient.connectionPool();
CollectionsKt.addAll(this.interceptors, okHttpClient.interceptors());
CollectionsKt.addAll(this.networkInterceptors, okHttpClient.networkInterceptors());
this.eventListenerFactory = okHttpClient.eventListenerFactory();
this.retryOnConnectionFailure = okHttpClient.retryOnConnectionFailure();
this.authenticator = okHttpClient.authenticator();
this.followRedirects = okHttpClient.followRedirects();
this.followSslRedirects = okHttpClient.followSslRedirects();
this.cookieJar = okHttpClient.cookieJar();
this.cache = okHttpClient.cache();
this.dns = okHttpClient.dns();
this.proxy = okHttpClient.proxy();
this.proxySelector = okHttpClient.proxySelector();
this.proxyAuthenticator = okHttpClient.proxyAuthenticator();
this.socketFactory = okHttpClient.socketFactory();
this.sslSocketFactoryOrNull = okHttpClient.sslSocketFactoryOrNull;
this.x509TrustManagerOrNull = okHttpClient.getX509TrustManager();
this.connectionSpecs = okHttpClient.connectionSpecs();
this.protocols = okHttpClient.protocols();
this.hostnameVerifier = okHttpClient.hostnameVerifier();
this.certificatePinner = okHttpClient.certificatePinner();
this.certificateChainCleaner = okHttpClient.getCertificateChainCleaner();
this.callTimeout = okHttpClient.callTimeoutMillis();
this.connectTimeout = okHttpClient.connectTimeoutMillis();
this.readTimeout = okHttpClient.readTimeoutMillis();
this.writeTimeout = okHttpClient.writeTimeoutMillis();
this.pingInterval = okHttpClient.pingIntervalMillis();
this.minWebSocketMessageToCompress = okHttpClient.getMinWebSocketMessageToCompress();
this.routeDatabase = okHttpClient.getRouteDatabase();
}
public final Builder dispatcher(Dispatcher dispatcher) {
Intrinsics.checkNotNullParameter(dispatcher, "dispatcher");
this.dispatcher = dispatcher;
return this;
}
public final Builder connectionPool(ConnectionPool connectionPool) {
Intrinsics.checkNotNullParameter(connectionPool, "connectionPool");
this.connectionPool = connectionPool;
return this;
}
public final Builder addInterceptor(Interceptor interceptor) {
Intrinsics.checkNotNullParameter(interceptor, "interceptor");
this.interceptors.add(interceptor);
return this;
}
/* renamed from: -addInterceptor, reason: not valid java name */
public final Builder m7380addInterceptor(final Function1<? super Interceptor.Chain, Response> block) {
Intrinsics.checkNotNullParameter(block, "block");
return addInterceptor(new Interceptor() { // from class: okhttp3.OkHttpClient$Builder$addInterceptor$2
@Override // okhttp3.Interceptor
public final Response intercept(Interceptor.Chain chain) {
Intrinsics.checkNotNullParameter(chain, "chain");
return (Response) Function1.this.invoke(chain);
}
});
}
public final Builder addNetworkInterceptor(Interceptor interceptor) {
Intrinsics.checkNotNullParameter(interceptor, "interceptor");
this.networkInterceptors.add(interceptor);
return this;
}
/* renamed from: -addNetworkInterceptor, reason: not valid java name */
public final Builder m7381addNetworkInterceptor(final Function1<? super Interceptor.Chain, Response> block) {
Intrinsics.checkNotNullParameter(block, "block");
return addNetworkInterceptor(new Interceptor() { // from class: okhttp3.OkHttpClient$Builder$addNetworkInterceptor$2
@Override // okhttp3.Interceptor
public final Response intercept(Interceptor.Chain chain) {
Intrinsics.checkNotNullParameter(chain, "chain");
return (Response) Function1.this.invoke(chain);
}
});
}
public final Builder eventListener(EventListener eventListener) {
Intrinsics.checkNotNullParameter(eventListener, "eventListener");
this.eventListenerFactory = Util.asFactory(eventListener);
return this;
}
public final Builder eventListenerFactory(EventListener.Factory eventListenerFactory) {
Intrinsics.checkNotNullParameter(eventListenerFactory, "eventListenerFactory");
this.eventListenerFactory = eventListenerFactory;
return this;
}
public final Builder retryOnConnectionFailure(boolean retryOnConnectionFailure) {
this.retryOnConnectionFailure = retryOnConnectionFailure;
return this;
}
public final Builder authenticator(Authenticator authenticator) {
Intrinsics.checkNotNullParameter(authenticator, "authenticator");
this.authenticator = authenticator;
return this;
}
public final Builder followRedirects(boolean followRedirects) {
this.followRedirects = followRedirects;
return this;
}
public final Builder followSslRedirects(boolean followProtocolRedirects) {
this.followSslRedirects = followProtocolRedirects;
return this;
}
public final Builder cookieJar(CookieJar cookieJar) {
Intrinsics.checkNotNullParameter(cookieJar, "cookieJar");
this.cookieJar = cookieJar;
return this;
}
public final Builder cache(Cache cache) {
this.cache = cache;
return this;
}
public final Builder dns(Dns dns) {
Intrinsics.checkNotNullParameter(dns, "dns");
if (!Intrinsics.areEqual(dns, this.dns)) {
this.routeDatabase = null;
}
this.dns = dns;
return this;
}
public final Builder proxy(Proxy proxy) {
if (!Intrinsics.areEqual(proxy, this.proxy)) {
this.routeDatabase = null;
}
this.proxy = proxy;
return this;
}
public final Builder proxySelector(ProxySelector proxySelector) {
Intrinsics.checkNotNullParameter(proxySelector, "proxySelector");
if (!Intrinsics.areEqual(proxySelector, this.proxySelector)) {
this.routeDatabase = null;
}
this.proxySelector = proxySelector;
return this;
}
public final Builder proxyAuthenticator(Authenticator proxyAuthenticator) {
Intrinsics.checkNotNullParameter(proxyAuthenticator, "proxyAuthenticator");
if (!Intrinsics.areEqual(proxyAuthenticator, this.proxyAuthenticator)) {
this.routeDatabase = null;
}
this.proxyAuthenticator = proxyAuthenticator;
return this;
}
public final Builder socketFactory(SocketFactory socketFactory) {
Intrinsics.checkNotNullParameter(socketFactory, "socketFactory");
if (!(!(socketFactory instanceof SSLSocketFactory))) {
throw new IllegalArgumentException("socketFactory instanceof SSLSocketFactory".toString());
}
if (!Intrinsics.areEqual(socketFactory, this.socketFactory)) {
this.routeDatabase = null;
}
this.socketFactory = socketFactory;
return this;
}
@Deprecated(level = DeprecationLevel.ERROR, message = "Use the sslSocketFactory overload that accepts a X509TrustManager.")
public final Builder sslSocketFactory(SSLSocketFactory sslSocketFactory) {
Intrinsics.checkNotNullParameter(sslSocketFactory, "sslSocketFactory");
if (!Intrinsics.areEqual(sslSocketFactory, this.sslSocketFactoryOrNull)) {
this.routeDatabase = null;
}
this.sslSocketFactoryOrNull = sslSocketFactory;
X509TrustManager trustManager = Platform.INSTANCE.get().trustManager(sslSocketFactory);
if (trustManager == null) {
throw new IllegalStateException("Unable to extract the trust manager on " + Platform.INSTANCE.get() + ", sslSocketFactory is " + sslSocketFactory.getClass());
}
this.x509TrustManagerOrNull = trustManager;
Platform platform = Platform.INSTANCE.get();
X509TrustManager x509TrustManager = this.x509TrustManagerOrNull;
Intrinsics.checkNotNull(x509TrustManager);
this.certificateChainCleaner = platform.buildCertificateChainCleaner(x509TrustManager);
return this;
}
public final Builder sslSocketFactory(SSLSocketFactory sslSocketFactory, X509TrustManager trustManager) {
Intrinsics.checkNotNullParameter(sslSocketFactory, "sslSocketFactory");
Intrinsics.checkNotNullParameter(trustManager, "trustManager");
if ((!Intrinsics.areEqual(sslSocketFactory, this.sslSocketFactoryOrNull)) || (!Intrinsics.areEqual(trustManager, this.x509TrustManagerOrNull))) {
this.routeDatabase = null;
}
this.sslSocketFactoryOrNull = sslSocketFactory;
this.certificateChainCleaner = CertificateChainCleaner.INSTANCE.get(trustManager);
this.x509TrustManagerOrNull = trustManager;
return this;
}
public final Builder connectionSpecs(List<ConnectionSpec> connectionSpecs) {
Intrinsics.checkNotNullParameter(connectionSpecs, "connectionSpecs");
if (!Intrinsics.areEqual(connectionSpecs, this.connectionSpecs)) {
this.routeDatabase = null;
}
this.connectionSpecs = Util.toImmutableList(connectionSpecs);
return this;
}
public final Builder protocols(List<? extends Protocol> protocols) {
Intrinsics.checkNotNullParameter(protocols, "protocols");
List mutableList = CollectionsKt.toMutableList((Collection) protocols);
if (!(mutableList.contains(Protocol.H2_PRIOR_KNOWLEDGE) || mutableList.contains(Protocol.HTTP_1_1))) {
throw new IllegalArgumentException(("protocols must contain h2_prior_knowledge or http/1.1: " + mutableList).toString());
}
if (!(!mutableList.contains(Protocol.H2_PRIOR_KNOWLEDGE) || mutableList.size() <= 1)) {
throw new IllegalArgumentException(("protocols containing h2_prior_knowledge cannot use other protocols: " + mutableList).toString());
}
if (!(!mutableList.contains(Protocol.HTTP_1_0))) {
throw new IllegalArgumentException(("protocols must not contain http/1.0: " + mutableList).toString());
}
if (mutableList == null) {
throw new NullPointerException("null cannot be cast to non-null type kotlin.collections.List<okhttp3.Protocol?>");
}
if (!(!mutableList.contains(null))) {
throw new IllegalArgumentException("protocols must not contain null".toString());
}
mutableList.remove(Protocol.SPDY_3);
if (!Intrinsics.areEqual(mutableList, this.protocols)) {
this.routeDatabase = null;
}
List<? extends Protocol> unmodifiableList = Collections.unmodifiableList(mutableList);
Intrinsics.checkNotNullExpressionValue(unmodifiableList, "Collections.unmodifiableList(protocolsCopy)");
this.protocols = unmodifiableList;
return this;
}
public final Builder hostnameVerifier(HostnameVerifier hostnameVerifier) {
Intrinsics.checkNotNullParameter(hostnameVerifier, "hostnameVerifier");
if (!Intrinsics.areEqual(hostnameVerifier, this.hostnameVerifier)) {
this.routeDatabase = null;
}
this.hostnameVerifier = hostnameVerifier;
return this;
}
public final Builder certificatePinner(CertificatePinner certificatePinner) {
Intrinsics.checkNotNullParameter(certificatePinner, "certificatePinner");
if (!Intrinsics.areEqual(certificatePinner, this.certificatePinner)) {
this.routeDatabase = null;
}
this.certificatePinner = certificatePinner;
return this;
}
public final Builder callTimeout(long timeout, TimeUnit unit) {
Intrinsics.checkNotNullParameter(unit, "unit");
this.callTimeout = Util.checkDuration(ProfilingTraceData.TRUNCATION_REASON_TIMEOUT, timeout, unit);
return this;
}
public final Builder callTimeout(Duration duration) {
Intrinsics.checkNotNullParameter(duration, "duration");
callTimeout(duration.toMillis(), TimeUnit.MILLISECONDS);
return this;
}
public final Builder connectTimeout(long timeout, TimeUnit unit) {
Intrinsics.checkNotNullParameter(unit, "unit");
this.connectTimeout = Util.checkDuration(ProfilingTraceData.TRUNCATION_REASON_TIMEOUT, timeout, unit);
return this;
}
public final Builder connectTimeout(Duration duration) {
Intrinsics.checkNotNullParameter(duration, "duration");
connectTimeout(duration.toMillis(), TimeUnit.MILLISECONDS);
return this;
}
public final Builder readTimeout(long timeout, TimeUnit unit) {
Intrinsics.checkNotNullParameter(unit, "unit");
this.readTimeout = Util.checkDuration(ProfilingTraceData.TRUNCATION_REASON_TIMEOUT, timeout, unit);
return this;
}
public final Builder readTimeout(Duration duration) {
Intrinsics.checkNotNullParameter(duration, "duration");
readTimeout(duration.toMillis(), TimeUnit.MILLISECONDS);
return this;
}
public final Builder writeTimeout(long timeout, TimeUnit unit) {
Intrinsics.checkNotNullParameter(unit, "unit");
this.writeTimeout = Util.checkDuration(ProfilingTraceData.TRUNCATION_REASON_TIMEOUT, timeout, unit);
return this;
}
public final Builder writeTimeout(Duration duration) {
Intrinsics.checkNotNullParameter(duration, "duration");
writeTimeout(duration.toMillis(), TimeUnit.MILLISECONDS);
return this;
}
public final Builder pingInterval(long interval, TimeUnit unit) {
Intrinsics.checkNotNullParameter(unit, "unit");
this.pingInterval = Util.checkDuration("interval", interval, unit);
return this;
}
public final Builder pingInterval(Duration duration) {
Intrinsics.checkNotNullParameter(duration, "duration");
pingInterval(duration.toMillis(), TimeUnit.MILLISECONDS);
return this;
}
public final Builder minWebSocketMessageToCompress(long bytes) {
if (!(bytes >= 0)) {
throw new IllegalArgumentException(("minWebSocketMessageToCompress must be positive: " + bytes).toString());
}
this.minWebSocketMessageToCompress = bytes;
return this;
}
public final OkHttpClient build() {
return new OkHttpClient(this);
}
}
/* compiled from: OkHttpClient.kt */
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000 \n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002R\u001a\u0010\u0003\u001a\b\u0012\u0004\u0012\u00020\u00050\u0004X\u0080\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0006\u0010\u0007R\u001a\u0010\b\u001a\b\u0012\u0004\u0012\u00020\t0\u0004X\u0080\u0004¢\u0006\b\n\u0000\u001a\u0004\b\n\u0010\u0007¨\u0006\u000b"}, d2 = {"Lokhttp3/OkHttpClient$Companion;", "", "()V", "DEFAULT_CONNECTION_SPECS", "", "Lokhttp3/ConnectionSpec;", "getDEFAULT_CONNECTION_SPECS$okhttp", "()Ljava/util/List;", "DEFAULT_PROTOCOLS", "Lokhttp3/Protocol;", "getDEFAULT_PROTOCOLS$okhttp", "okhttp"}, k = 1, mv = {1, 4, 0})
/* loaded from: classes3.dex */
public static final class Companion {
private Companion() {
}
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public final List<Protocol> getDEFAULT_PROTOCOLS$okhttp() {
return OkHttpClient.DEFAULT_PROTOCOLS;
}
public final List<ConnectionSpec> getDEFAULT_CONNECTION_SPECS$okhttp() {
return OkHttpClient.DEFAULT_CONNECTION_SPECS;
}
}
}