package defpackage;

import android.content.Context;
import dagger.internal.DaggerGenerated;
import dagger.internal.Factory;
import dagger.internal.Preconditions;
import dagger.internal.QualifierMetadata;
import dagger.internal.ScopeMetadata;
import java.io.File;
import java.security.KeyManagementException;
import java.security.NoSuchAlgorithmException;
import java.util.concurrent.TimeUnit;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocketFactory;
import okhttp3.Cache;
import okhttp3.ConnectionPool;
import okhttp3.OkHttpClient;
import okhttp3.logging.HttpLoggingInterceptor;

/* JADX INFO: loaded from: classes3.dex */
@ScopeMetadata("javax.inject.Singleton")
@DaggerGenerated
@QualifierMetadata({"dagger.hilt.android.qualifiers.ApplicationContext"})
public final class bm6 implements Factory<OkHttpClient> {
    public static OkHttpClient a(Context context) throws NoSuchAlgorithmException, KeyManagementException {
        cr4.g(context, "context");
        Cache cache = new Cache(new File(context.getCacheDir(), "http_cache"), 52428800L);
        bt6 bt6Var = new bt6();
        SSLContext sSLContext = SSLContext.getInstance("TLS");
        sSLContext.init(null, new bt6[]{bt6Var}, null);
        OkHttpClient.Builder builder = new OkHttpClient.Builder();
        SSLSocketFactory socketFactory = sSLContext.getSocketFactory();
        cr4.f(socketFactory, "getSocketFactory(...)");
        OkHttpClient.Builder builderDns = builder.sslSocketFactory(socketFactory, bt6Var).cache(cache).connectionPool(new ConnectionPool(15, 5L, TimeUnit.MINUTES)).dns(new wf4());
        TimeUnit timeUnit = TimeUnit.SECONDS;
        OkHttpClient.Builder builderAddInterceptor = builderDns.connectTimeout(30L, timeUnit).readTimeout(30L, timeUnit).writeTimeout(30L, timeUnit).addInterceptor(new i48());
        HttpLoggingInterceptor httpLoggingInterceptor = new HttpLoggingInterceptor(null, 1, null);
        httpLoggingInterceptor.level(HttpLoggingInterceptor.Level.NONE);
        return (OkHttpClient) Preconditions.checkNotNullFromProvides(builderAddInterceptor.addInterceptor(httpLoggingInterceptor).build());
    }

    @Override // javax.inject.Provider
    public final Object get() {
        throw null;
    }
}
