2021-08-03 07:33:18 +00:00
|
|
|
package i0;
|
|
|
|
|
|
|
|
import i0.f0.w;
|
|
|
|
import i0.h;
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.lang.annotation.Annotation;
|
|
|
|
import java.lang.reflect.Type;
|
|
|
|
import kotlin.Unit;
|
|
|
|
import okhttp3.RequestBody;
|
|
|
|
import okhttp3.ResponseBody;
|
|
|
|
/* compiled from: BuiltInConverters */
|
|
|
|
public final class c extends h.a {
|
|
|
|
public boolean a = true;
|
|
|
|
|
|
|
|
/* compiled from: BuiltInConverters */
|
|
|
|
public static final class a implements h<ResponseBody, ResponseBody> {
|
|
|
|
public static final a a = new a();
|
|
|
|
|
|
|
|
/* Return type fixed from 'java.lang.Object' to match base method */
|
|
|
|
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
|
|
|
|
@Override // i0.h
|
|
|
|
public ResponseBody convert(ResponseBody responseBody) throws IOException {
|
|
|
|
ResponseBody responseBody2 = responseBody;
|
|
|
|
try {
|
|
|
|
return c0.a(responseBody2);
|
|
|
|
} finally {
|
|
|
|
responseBody2.close();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* compiled from: BuiltInConverters */
|
|
|
|
public static final class b implements h<RequestBody, RequestBody> {
|
|
|
|
public static final b a = new b();
|
|
|
|
|
|
|
|
/* Return type fixed from 'java.lang.Object' to match base method */
|
|
|
|
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
|
|
|
|
@Override // i0.h
|
|
|
|
public RequestBody convert(RequestBody requestBody) throws IOException {
|
|
|
|
return requestBody;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* compiled from: BuiltInConverters */
|
|
|
|
/* renamed from: i0.c$c reason: collision with other inner class name */
|
2021-09-07 06:52:02 +00:00
|
|
|
public static final class C0316c implements h<ResponseBody, ResponseBody> {
|
|
|
|
public static final C0316c a = new C0316c();
|
2021-08-03 07:33:18 +00:00
|
|
|
|
|
|
|
/* Return type fixed from 'java.lang.Object' to match base method */
|
|
|
|
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
|
|
|
|
@Override // i0.h
|
|
|
|
public ResponseBody convert(ResponseBody responseBody) throws IOException {
|
|
|
|
return responseBody;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* compiled from: BuiltInConverters */
|
|
|
|
public static final class d implements h<Object, String> {
|
|
|
|
public static final d a = new d();
|
|
|
|
|
|
|
|
/* Return type fixed from 'java.lang.Object' to match base method */
|
|
|
|
@Override // i0.h
|
|
|
|
public String convert(Object obj) throws IOException {
|
|
|
|
return obj.toString();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* compiled from: BuiltInConverters */
|
|
|
|
public static final class e implements h<ResponseBody, Unit> {
|
|
|
|
public static final e a = new e();
|
|
|
|
|
|
|
|
/* Return type fixed from 'java.lang.Object' to match base method */
|
|
|
|
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
|
|
|
|
@Override // i0.h
|
|
|
|
public Unit convert(ResponseBody responseBody) throws IOException {
|
|
|
|
responseBody.close();
|
|
|
|
return Unit.a;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* compiled from: BuiltInConverters */
|
|
|
|
public static final class f implements h<ResponseBody, Void> {
|
|
|
|
public static final f a = new f();
|
|
|
|
|
|
|
|
/* Return type fixed from 'java.lang.Object' to match base method */
|
|
|
|
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
|
|
|
|
@Override // i0.h
|
|
|
|
public Void convert(ResponseBody responseBody) throws IOException {
|
|
|
|
responseBody.close();
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // i0.h.a
|
|
|
|
public h<?, RequestBody> requestBodyConverter(Type type, Annotation[] annotationArr, Annotation[] annotationArr2, y yVar) {
|
|
|
|
if (RequestBody.class.isAssignableFrom(c0.f(type))) {
|
|
|
|
return b.a;
|
|
|
|
}
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // i0.h.a
|
|
|
|
public h<ResponseBody, ?> responseBodyConverter(Type type, Annotation[] annotationArr, y yVar) {
|
|
|
|
if (type == ResponseBody.class) {
|
2021-09-07 06:52:02 +00:00
|
|
|
return c0.i(annotationArr, w.class) ? C0316c.a : a.a;
|
2021-08-03 07:33:18 +00:00
|
|
|
}
|
|
|
|
if (type == Void.class) {
|
|
|
|
return f.a;
|
|
|
|
}
|
|
|
|
if (!this.a || type != Unit.class) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
try {
|
|
|
|
return e.a;
|
|
|
|
} catch (NoClassDefFoundError unused) {
|
|
|
|
this.a = false;
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|