89 lines
2.9 KiB
Java
89 lines
2.9 KiB
Java
package o;
|
|
|
|
import java.util.concurrent.TimeUnit;
|
|
import java.util.regex.Pattern;
|
|
import okhttp3.Interceptor;
|
|
import okhttp3.OkHttpClient;
|
|
import retrofit2.CallAdapter;
|
|
import retrofit2.Converter;
|
|
import retrofit2.Retrofit;
|
|
|
|
/* loaded from: classes.dex */
|
|
public final class aSQ {
|
|
private final xWN a;
|
|
public Retrofit b;
|
|
private final int c;
|
|
private final xSU d;
|
|
private final C0970Soj e;
|
|
private final Interceptor f;
|
|
private final xGf g;
|
|
private final String h;
|
|
private final Converter.Factory i;
|
|
private Interceptor j;
|
|
private final CallAdapter.Factory k;
|
|
private final igD l;
|
|
private Retrofit.Builder m;
|
|
private OkHttpClient.Builder n;
|
|
|
|
/* renamed from: o, reason: collision with root package name */
|
|
private final boolean f8503o;
|
|
|
|
static {
|
|
Pattern.compile("^[^.]*\\.(.*)$");
|
|
}
|
|
|
|
public aSQ(String str, Interceptor interceptor, igD igd, xSU xsu, C0970Soj c0970Soj, xGf xgf, Converter.Factory factory, CallAdapter.Factory factory2, boolean z, xWN xwn) {
|
|
this(str, interceptor, igd, xsu, c0970Soj, xgf, factory, factory2, 30, z, xwn);
|
|
}
|
|
|
|
public aSQ(String str, Interceptor interceptor, igD igd, xSU xsu, C0970Soj c0970Soj, xGf xgf, Converter.Factory factory, CallAdapter.Factory factory2, int i, boolean z, xWN xwn) {
|
|
this.h = str;
|
|
this.f = interceptor;
|
|
this.l = igd;
|
|
this.d = xsu;
|
|
this.e = c0970Soj;
|
|
this.g = xgf;
|
|
this.i = factory;
|
|
this.k = factory2;
|
|
this.c = i;
|
|
this.f8503o = z;
|
|
this.a = xwn;
|
|
e();
|
|
b(str, factory);
|
|
this.b = this.m.build();
|
|
}
|
|
|
|
public aSQ(String str, Interceptor interceptor, igD igd, xSU xsu, C0970Soj c0970Soj, xGf xgf, Converter.Factory factory, CallAdapter.Factory factory2, Interceptor interceptor2, xWN xwn) {
|
|
this.h = str;
|
|
this.f = interceptor;
|
|
this.l = igd;
|
|
this.d = xsu;
|
|
this.e = c0970Soj;
|
|
this.g = xgf;
|
|
this.i = factory;
|
|
this.k = factory2;
|
|
this.c = 30;
|
|
this.j = interceptor2;
|
|
this.f8503o = true;
|
|
this.a = xwn;
|
|
e();
|
|
b(str, factory);
|
|
this.b = this.m.build();
|
|
}
|
|
|
|
private void e() {
|
|
OkHttpClient.Builder addInterceptor = new OkHttpClient.Builder().addInterceptor(this.f).addInterceptor(this.l).addInterceptor(this.g).addInterceptor(this.d).addInterceptor(this.a);
|
|
this.n = addInterceptor;
|
|
Interceptor interceptor = this.j;
|
|
if (interceptor != null) {
|
|
addInterceptor.addInterceptor(interceptor);
|
|
}
|
|
this.n.addInterceptor(this.e);
|
|
this.n.readTimeout(this.c, TimeUnit.SECONDS).connectTimeout(this.c, TimeUnit.SECONDS);
|
|
}
|
|
|
|
private void b(String str, Converter.Factory factory) {
|
|
this.m = new Retrofit.Builder().baseUrl(str).addConverterFactory(factory).client(this.n.build()).addCallAdapterFactory(this.k);
|
|
}
|
|
}
|