package i0; 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; /* compiled from: DefaultCallAdapterFactory.java */ /* loaded from: classes3.dex */ public final class i extends e.a { public final Executor a; /* compiled from: DefaultCallAdapterFactory.java */ /* loaded from: classes3.dex */ public class a implements e> { public final /* synthetic */ Type a; /* renamed from: b reason: collision with root package name */ public final /* synthetic */ Executor f3722b; public a(i iVar, Type type, Executor executor) { this.a = type; this.f3722b = executor; } @Override // i0.e public Type a() { return this.a; } @Override // i0.e public d b(d dVar) { Executor executor = this.f3722b; return executor == null ? dVar : new b(executor, dVar); } } /* compiled from: DefaultCallAdapterFactory.java */ /* loaded from: classes3.dex */ public static final class b implements d { public final Executor j; public final d k; /* compiled from: DefaultCallAdapterFactory.java */ /* loaded from: classes3.dex */ public class a implements f { public final /* synthetic */ f a; public a(f fVar) { this.a = fVar; } @Override // i0.f public void a(d dVar, Throwable th) { b.this.j.execute(new a(this, this.a, th)); } @Override // i0.f public void b(d dVar, Response response) { b.this.j.execute(new b(this, this.a, response)); } } public b(Executor executor, d dVar) { this.j = executor; this.k = dVar; } @Override // i0.d public void C(f fVar) { this.k.C(new a(fVar)); } @Override // i0.d /* renamed from: L */ public d clone() { return new b(this.j, this.k.L()); } @Override // i0.d public Request c() { return this.k.c(); } @Override // i0.d public void cancel() { this.k.cancel(); } @Override // i0.d public boolean d() { return this.k.d(); } @Override // i0.d public Response execute() throws IOException { return this.k.execute(); } } public i(Executor executor) { this.a = executor; } @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 or Call"); } }