package com.fyber.inneractive.sdk.click; import android.net.Uri; import android.text.TextUtils; import com.fyber.inneractive.sdk.click.l; import com.fyber.inneractive.sdk.config.IAConfigManager; import com.fyber.inneractive.sdk.config.v; import com.fyber.inneractive.sdk.network.w; import com.fyber.inneractive.sdk.util.p; import java.util.ArrayList; import java.util.Iterator; import java.util.List; /* loaded from: classes2.dex */ public final class e implements w { public final /* synthetic */ List a; public final /* synthetic */ Uri b; public final /* synthetic */ f c; public e(f fVar, ArrayList arrayList, Uri uri) { this.c = fVar; this.a = arrayList; this.b = uri; } @Override // com.fyber.inneractive.sdk.network.w public final void a(c cVar, Exception exc, boolean z) { c cVar2 = cVar; if (exc != null || cVar2 == null) { String uri = this.b.toString(); IAConfigManager iAConfigManager = IAConfigManager.L; p.b.post(new v(uri, null)); Uri uri2 = this.b; this.c.getClass(); b a = l.a(uri2.toString(), "IgniteGooglePlay", "failed getting redirects"); List list = this.a; if (list != null) { list.add(new i(this.b.toString(), false, l.d.INTERNAL_REDIRECT, "failed getting redirects. ignite click handler")); List list2 = this.a; a.f.clear(); a.f.addAll(list2); } f fVar = this.c; fVar.c.a(a, fVar.d, fVar.e); return; } if (cVar2.a.size() > 0) { ArrayList arrayList = cVar2.a; String str = (String) arrayList.get(arrayList.size() - 1); if (this.a != null) { Iterator it = cVar2.a.iterator(); while (it.hasNext()) { String str2 = (String) it.next(); if (!TextUtils.equals(str2, str)) { this.a.add(new i(str2, true, l.d.INTERNAL_REDIRECT, null)); } } List list3 = this.a; l.d dVar = l.d.OPEN_INTERNAL_STORE; list3.add(new i(str, true, dVar, null)); this.c.getClass(); b a2 = l.a(str, dVar, "IgniteGooglePlay"); List list4 = this.a; a2.f.clear(); a2.f.addAll(list4); f fVar2 = this.c; fVar2.c.a(a2, fVar2.d, fVar2.e); } if (str.startsWith("market")) { String replace = str.replace("market://details?id=", "https://play.google.com/store/apps/details?id="); IAConfigManager iAConfigManager2 = IAConfigManager.L; p.b.post(new v(replace, null)); } else { String str3 = cVar2.b; IAConfigManager iAConfigManager3 = IAConfigManager.L; p.b.post(new v(str, str3)); } } } }