package com.fyber.inneractive.sdk.network; import com.fyber.inneractive.sdk.external.InneractiveAdRequest; import com.fyber.inneractive.sdk.external.InneractiveErrorCode; import com.fyber.inneractive.sdk.external.InneractiveInfrastructureError; import com.fyber.inneractive.sdk.network.c0; import com.fyber.inneractive.sdk.network.k; import com.fyber.inneractive.sdk.util.IAlog; import java.io.FileNotFoundException; /* loaded from: classes2.dex */ public final class p extends k { public final InneractiveAdRequest e; public final d0 f; public class a implements w { public a() { } @Override // com.fyber.inneractive.sdk.network.w public final void a(com.fyber.inneractive.sdk.response.e eVar, Exception exc, boolean z) { k.a aVar; com.fyber.inneractive.sdk.response.e eVar2 = eVar; if (exc == null) { p pVar = p.this; pVar.a(pVar.e, eVar2); return; } p.this.getClass(); InneractiveErrorCode inneractiveErrorCode = exc instanceof t0 ? ((t0) exc).a == 204 ? InneractiveErrorCode.NO_FILL : InneractiveErrorCode.SERVER_INTERNAL_ERROR : exc instanceof FileNotFoundException ? InneractiveErrorCode.CONNECTION_ERROR : exc instanceof a0 ? InneractiveErrorCode.SERVER_INVALID_RESPONSE : InneractiveErrorCode.CONNECTION_ERROR; p pVar2 = p.this; InneractiveInfrastructureError inneractiveInfrastructureError = new InneractiveInfrastructureError(inneractiveErrorCode, com.fyber.inneractive.sdk.flow.g.NETWORK_ERROR, exc); InneractiveAdRequest inneractiveAdRequest = pVar2.e; if (pVar2.a == null) { return; } if (pVar2.b) { IAlog.e("IARemoteAdFetcher: ignoring response. Previous request was cancelled", new Object[0]); } else { if (pVar2.b || (aVar = pVar2.a) == null) { return; } ((com.fyber.inneractive.sdk.flow.k) aVar).a(inneractiveAdRequest, inneractiveInfrastructureError, eVar2); } } } public class b implements c0.a { public b() { } @Override // com.fyber.inneractive.sdk.network.c0.a public final void a(String str) { str.hashCode(); switch (str) { case "sdkInitNetworkRequest": com.fyber.inneractive.sdk.metrics.d.d.a(p.this.d).d(); break; case "sdkGotServerResponse": com.fyber.inneractive.sdk.metrics.d.d.a(p.this.d).e(); break; case "sdkParsedResponse": com.fyber.inneractive.sdk.metrics.d.d.a(p.this.d).c(); break; } } } public p(InneractiveAdRequest inneractiveAdRequest, String str, com.fyber.inneractive.sdk.config.global.s sVar, k.a aVar) { super(sVar, str, aVar); this.e = inneractiveAdRequest; this.f = new d0(new a(), inneractiveAdRequest, sVar); c(); } @Override // com.fyber.inneractive.sdk.network.k public final void a() { super.a(); this.f.a = true; } @Override // com.fyber.inneractive.sdk.network.k public final String b() { return this.f.getUrl(); } public final void c() { this.f.d = new b(); } }