discord-jadx/app/src/main/java/i0/i.java

124 lines
3.3 KiB
Java
Raw Normal View History

2021-08-03 07:33:18 +00:00
package i0;
2021-11-02 06:38:17 +00:00
import i0.e;
import java.io.IOException;
import java.lang.annotation.Annotation;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.concurrent.Executor;
import okhttp3.Request;
import retrofit2.Response;
2022-03-07 09:34:54 +00:00
/* compiled from: DefaultCallAdapterFactory.java */
/* loaded from: classes3.dex */
2021-11-02 06:38:17 +00:00
public final class i extends e.a {
public final Executor a;
2021-08-03 07:33:18 +00:00
2022-03-07 09:34:54 +00:00
/* compiled from: DefaultCallAdapterFactory.java */
/* loaded from: classes3.dex */
2021-11-02 06:38:17 +00:00
public class a implements e<Object, d<?>> {
public final /* synthetic */ Type a;
2021-12-17 21:59:34 +00:00
/* renamed from: b reason: collision with root package name */
2022-03-28 08:10:50 +00:00
public final /* synthetic */ Executor f3733b;
2021-08-03 07:33:18 +00:00
2021-11-02 06:38:17 +00:00
public a(i iVar, Type type, Executor executor) {
this.a = type;
2022-03-28 08:10:50 +00:00
this.f3733b = executor;
2021-11-02 06:38:17 +00:00
}
2021-08-03 07:33:18 +00:00
2021-11-02 06:38:17 +00:00
@Override // i0.e
public Type a() {
return this.a;
}
@Override // i0.e
public d<?> b(d<Object> dVar) {
2022-03-28 08:10:50 +00:00
Executor executor = this.f3733b;
2021-11-02 06:38:17 +00:00
return executor == null ? dVar : new b(executor, dVar);
}
}
2022-03-07 09:34:54 +00:00
/* compiled from: DefaultCallAdapterFactory.java */
/* loaded from: classes3.dex */
2021-11-02 06:38:17 +00:00
public static final class b<T> implements d<T> {
2021-12-02 18:53:44 +00:00
public final Executor j;
public final d<T> k;
2021-11-02 06:38:17 +00:00
2022-03-07 09:34:54 +00:00
/* compiled from: DefaultCallAdapterFactory.java */
/* loaded from: classes3.dex */
2021-11-02 06:38:17 +00:00
public class a implements f<T> {
public final /* synthetic */ f a;
public a(f fVar) {
this.a = fVar;
}
@Override // i0.f
public void a(d<T> dVar, Throwable th) {
2021-12-02 18:53:44 +00:00
b.this.j.execute(new a(this, this.a, th));
2021-11-02 06:38:17 +00:00
}
@Override // i0.f
public void b(d<T> dVar, Response<T> response) {
2021-12-02 18:53:44 +00:00
b.this.j.execute(new b(this, this.a, response));
2021-11-02 06:38:17 +00:00
}
}
public b(Executor executor, d<T> dVar) {
2021-12-02 18:53:44 +00:00
this.j = executor;
this.k = dVar;
2021-11-02 06:38:17 +00:00
}
@Override // i0.d
2021-11-05 06:48:17 +00:00
public void C(f<T> fVar) {
2021-12-02 18:53:44 +00:00
this.k.C(new a(fVar));
2021-11-02 06:38:17 +00:00
}
@Override // i0.d
2021-11-05 06:48:17 +00:00
/* renamed from: L */
2021-11-02 06:38:17 +00:00
public d<T> clone() {
2021-12-02 18:53:44 +00:00
return new b(this.j, this.k.L());
2021-11-02 06:38:17 +00:00
}
@Override // i0.d
public Request c() {
2021-12-02 18:53:44 +00:00
return this.k.c();
2021-11-02 06:38:17 +00:00
}
@Override // i0.d
public void cancel() {
2021-12-02 18:53:44 +00:00
this.k.cancel();
2021-11-02 06:38:17 +00:00
}
@Override // i0.d
public boolean d() {
2021-12-02 18:53:44 +00:00
return this.k.d();
2021-11-02 06:38:17 +00:00
}
@Override // i0.d
public Response<T> execute() throws IOException {
2021-12-02 18:53:44 +00:00
return this.k.execute();
2021-11-02 06:38:17 +00:00
}
}
public i(Executor executor) {
this.a = executor;
2021-08-03 07:33:18 +00:00
}
2021-11-02 06:38:17 +00:00
@Override // i0.e.a
public e<?, ?> a(Type type, Annotation[] annotationArr, y yVar) {
Executor executor = null;
if (c0.f(type) != d.class) {
return null;
}
if (type instanceof ParameterizedType) {
Type e = c0.e(0, (ParameterizedType) type);
if (!c0.i(annotationArr, a0.class)) {
executor = this.a;
}
return new a(this, e, executor);
}
throw new IllegalArgumentException("Call return type must be parameterized as Call<Foo> or Call<? extends Foo>");
2021-08-03 07:33:18 +00:00
}
}