Add decompiled APK source code (JADX)

- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-18 14:52:23 -08:00
parent cc210a65ea
commit f9d20bb3fc
26991 changed files with 2541449 additions and 0 deletions

View File

@@ -0,0 +1,56 @@
package com.fyber.inneractive.sdk.flow;
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.s;
import com.fyber.inneractive.sdk.util.IAlog;
import java.util.Arrays;
import org.json.JSONArray;
import org.json.JSONObject;
/* loaded from: classes2.dex */
public final class a {
public static void a(InneractiveAdRequest inneractiveAdRequest, InneractiveInfrastructureError inneractiveInfrastructureError, q qVar, com.fyber.inneractive.sdk.response.e eVar, JSONArray jSONArray) {
String sb;
if (inneractiveInfrastructureError.getErrorCode().getMetricable() == InneractiveErrorCode.Metricable.INCLUDED_IN_FAILED_METRICS) {
if ((qVar == null || qVar.e() || qVar.isVideoAd()) && !inneractiveInfrastructureError.isErrorAlreadyReported(com.fyber.inneractive.sdk.network.q.IA_AD_LOAD_FAILED)) {
IAlog.a("Firing Event 801 - AdLoadFailed - errorCode - %s", inneractiveInfrastructureError.getErrorCode());
if (inneractiveInfrastructureError.getCause() != null) {
sb = Arrays.toString(inneractiveInfrastructureError.getCause().getStackTrace());
} else {
StringBuilder sb2 = new StringBuilder();
StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
for (int i = 7; i >= 0 && i < 13 && i < stackTrace.length; i++) {
sb2.append(stackTrace[i].toString());
sb2.append(",");
}
sb = sb2.toString();
}
com.fyber.inneractive.sdk.network.q qVar2 = com.fyber.inneractive.sdk.network.q.IA_AD_LOAD_FAILED;
s.a aVar = new s.a(qVar2, inneractiveAdRequest, eVar, jSONArray);
JSONObject jSONObject = new JSONObject();
String obj = inneractiveInfrastructureError.getFyberMarketplaceAdLoadFailureReason().toString();
try {
jSONObject.put("message", obj);
} catch (Exception unused) {
IAlog.f("Got exception adding param to json object: %s, %s", "message", obj);
}
try {
jSONObject.put("description", sb);
} catch (Exception unused2) {
IAlog.f("Got exception adding param to json object: %s, %s", "description", sb);
}
String description = inneractiveInfrastructureError.description();
try {
jSONObject.put("extra_description", description);
} catch (Exception unused3) {
IAlog.f("Got exception adding param to json object: %s, %s", "extra_description", description);
}
aVar.f.put(jSONObject);
aVar.a((String) null);
inneractiveInfrastructureError.addReportedError(qVar2);
}
}
}
}

View File

@@ -0,0 +1,24 @@
package com.fyber.inneractive.sdk.flow;
import com.fyber.inneractive.sdk.util.c1;
/* loaded from: classes2.dex */
public final class a0 implements c1.b {
public final /* synthetic */ z a;
public a0(z zVar) {
this.a = zVar;
}
@Override // com.fyber.inneractive.sdk.util.c1.b
public final void a() {
com.fyber.inneractive.sdk.util.p.b.post(this.a.l);
z zVar = this.a;
c1 c1Var = zVar.m;
if (c1Var != null) {
c1Var.e = null;
zVar.m = null;
}
zVar.q = false;
}
}

View File

@@ -0,0 +1,52 @@
package com.fyber.inneractive.sdk.flow;
import android.os.Handler;
import com.fyber.inneractive.sdk.interfaces.a;
import com.fyber.inneractive.sdk.util.IAlog;
/* loaded from: classes2.dex */
public final class b {
public Handler a;
public final a.b b;
public final a c = new a();
public final RunnableC0071b d = new RunnableC0071b();
public class a implements Runnable {
public a() {
}
@Override // java.lang.Runnable
public final void run() {
IAlog.a("%s : ContentLoadTimeoutHandler Executing timeout task", IAlog.a(b.this));
b.this.b.b();
}
}
/* renamed from: com.fyber.inneractive.sdk.flow.b$b, reason: collision with other inner class name */
public class RunnableC0071b implements Runnable {
public RunnableC0071b() {
}
@Override // java.lang.Runnable
public final void run() {
com.fyber.inneractive.sdk.util.p.b.post(b.this.c);
}
}
public b(a.b bVar) {
this.b = bVar;
}
public final void a() {
IAlog.a("%s : ContentLoadTimeoutHandler destroying timeout handler", IAlog.a(this));
if (this.a != null) {
IAlog.a("%s : ContentLoadTimeoutHandler stopping timeout handler", IAlog.a(this));
Handler handler = this.a;
if (handler != null) {
handler.removeCallbacks(this.d);
}
this.a.getLooper().quitSafely();
this.a = null;
}
}
}

View File

@@ -0,0 +1,26 @@
package com.fyber.inneractive.sdk.flow;
import com.fyber.inneractive.sdk.util.c1;
/* loaded from: classes2.dex */
public final class b0 implements c1.b {
public final /* synthetic */ z a;
public b0(z zVar) {
this.a = zVar;
}
@Override // com.fyber.inneractive.sdk.util.c1.b
public final void a() {
Runnable runnable = this.a.n;
if (runnable != null) {
com.fyber.inneractive.sdk.util.p.b.post(runnable);
}
z zVar = this.a;
c1 c1Var = zVar.o;
if (c1Var != null) {
c1Var.e = null;
zVar.o = null;
}
}
}

View File

@@ -0,0 +1,92 @@
package com.fyber.inneractive.sdk.flow;
import android.app.Application;
import android.content.SharedPreferences;
import com.fyber.inneractive.sdk.config.IAConfigManager;
import com.fyber.inneractive.sdk.external.InneractiveAdRequest;
import com.fyber.inneractive.sdk.external.InneractiveInfrastructureError;
import com.fyber.inneractive.sdk.network.s;
import com.fyber.inneractive.sdk.util.IAlog;
import java.util.Collection;
import java.util.Map;
import java.util.concurrent.CopyOnWriteArrayList;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes2.dex */
public final class c implements Runnable {
public final /* synthetic */ InneractiveInfrastructureError a;
public final /* synthetic */ d b;
public c(d dVar, InneractiveInfrastructureError inneractiveInfrastructureError) {
this.b = dVar;
this.a = inneractiveInfrastructureError;
}
@Override // java.lang.Runnable
public final void run() {
String str;
String str2;
T t = this.b.b;
if (t == 0 || (str = t.h) == null) {
return;
}
Map<String, String> map = t.p;
if (map == null && t.q == null) {
return;
}
com.fyber.inneractive.sdk.config.k kVar = IAConfigManager.L.t.b;
String a = kVar.a("max_failed_creatives_interval_hours", d.e);
String a2 = kVar.a("max_failed_creatives_per_interval", d.f);
int a3 = com.fyber.inneractive.sdk.util.t.a(a, 24);
int a4 = com.fyber.inneractive.sdk.util.t.a(a2, 1);
Application application = com.fyber.inneractive.sdk.util.o.a;
if (application != null) {
SharedPreferences sharedPreferences = application.getSharedPreferences("IAConfigPrefs", 0);
JSONArray jSONArray = new JSONArray();
try {
jSONArray = new JSONArray(sharedPreferences.getString("lt", "[]"));
} catch (JSONException unused) {
}
CopyOnWriteArrayList copyOnWriteArrayList = new CopyOnWriteArrayList();
if (kVar.a(false, this.b.a) && !com.fyber.inneractive.sdk.metrics.a.a(a3, a4, jSONArray, copyOnWriteArrayList)) {
copyOnWriteArrayList.add(Long.valueOf(System.currentTimeMillis()));
if (map != null) {
try {
str2 = new JSONObject(map).toString();
} catch (Throwable unused2) {
str2 = "";
}
} else {
str2 = this.b.b.q;
}
d dVar = this.b;
InneractiveAdRequest inneractiveAdRequest = dVar.c;
T t2 = dVar.b;
InneractiveInfrastructureError inneractiveInfrastructureError = this.a;
s.a aVar = new s.a(com.fyber.inneractive.sdk.network.q.IA_AD_FAILURE_DATA, inneractiveAdRequest, t2, dVar.d);
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("raw_response", str);
} catch (Exception unused3) {
IAlog.f("Got exception adding param to json object: %s, %s", "raw_response", str);
}
try {
jSONObject.put("headers", str2);
} catch (Exception unused4) {
IAlog.f("Got exception adding param to json object: %s, %s", "headers", str2);
}
String description = inneractiveInfrastructureError.description();
try {
jSONObject.put("error_code", description);
} catch (Exception unused5) {
IAlog.f("Got exception adding param to json object: %s, %s", "error_code", description);
}
aVar.f.put(jSONObject);
aVar.a((String) null);
}
sharedPreferences.edit().putString("lt", new JSONArray((Collection) copyOnWriteArrayList).toString()).apply();
}
}
}

View File

@@ -0,0 +1,58 @@
package com.fyber.inneractive.sdk.flow;
import com.fyber.inneractive.sdk.config.enums.UnitDisplayType;
import com.fyber.inneractive.sdk.ui.IAmraidWebViewController;
import com.fyber.inneractive.sdk.util.IAlog;
/* loaded from: classes2.dex */
public final class c0 extends p<com.fyber.inneractive.sdk.response.f> {
public IAmraidWebViewController i;
public c0(com.fyber.inneractive.sdk.config.f0 f0Var, com.fyber.inneractive.sdk.config.global.s sVar) {
super(f0Var, sVar);
}
@Override // com.fyber.inneractive.sdk.flow.q
public final void a() {
if (this.g != null && e()) {
com.fyber.inneractive.sdk.web.u uVar = this.g;
uVar.y = true;
uVar.D = false;
uVar.b.h.remove(uVar);
uVar.i = null;
IAlog.a("destroy internalStoreWebpageController", new Object[0]);
this.g = null;
}
IAmraidWebViewController iAmraidWebViewController = this.i;
if (iAmraidWebViewController != null) {
com.fyber.inneractive.sdk.measurement.tracker.c cVar = iAmraidWebViewController.J;
if (cVar != null) {
cVar.a(false);
}
this.i.d();
this.i = null;
}
}
@Override // com.fyber.inneractive.sdk.flow.q
public final boolean e() {
com.fyber.inneractive.sdk.config.x xVar;
UnitDisplayType unitDisplayType;
com.fyber.inneractive.sdk.config.f0 f0Var = this.d;
if (f0Var == null || (xVar = ((com.fyber.inneractive.sdk.config.e0) f0Var).c) == null || (unitDisplayType = xVar.b) == null) {
return false;
}
return unitDisplayType.isFullscreenUnit();
}
@Override // com.fyber.inneractive.sdk.flow.q
public boolean isVideoAd() {
return false;
}
@Override // com.fyber.inneractive.sdk.flow.q
public final boolean g() {
IAmraidWebViewController iAmraidWebViewController = this.i;
return (iAmraidWebViewController == null || iAmraidWebViewController.b == null) ? false : true;
}
}

View File

@@ -0,0 +1,21 @@
package com.fyber.inneractive.sdk.flow;
import com.fyber.inneractive.sdk.external.InneractiveAdRequest;
import com.fyber.inneractive.sdk.response.e;
import org.json.JSONArray;
/* loaded from: classes2.dex */
public final class d<T extends com.fyber.inneractive.sdk.response.e> extends com.fyber.inneractive.sdk.metrics.a {
public static final String e = String.valueOf(24);
public static final String f = String.valueOf(1);
public final T b;
public final InneractiveAdRequest c;
public final JSONArray d;
public d(T t, InneractiveAdRequest inneractiveAdRequest, String str, JSONArray jSONArray) {
super(str);
this.b = t;
this.c = inneractiveAdRequest;
this.d = jSONArray;
}
}

View File

@@ -0,0 +1,8 @@
package com.fyber.inneractive.sdk.flow;
import com.fyber.inneractive.sdk.flow.t;
/* loaded from: classes2.dex */
public interface d0 {
void a(t.c cVar);
}

View File

@@ -0,0 +1,55 @@
package com.fyber.inneractive.sdk.flow;
import android.content.Context;
import android.view.ViewGroup;
import com.fyber.inneractive.sdk.activities.FyberReportAdActivity;
import com.fyber.inneractive.sdk.external.ImpressionData;
import com.fyber.inneractive.sdk.external.InneractiveAdRequest;
import com.fyber.inneractive.sdk.ui.FyberAdIdentifierFactory;
import com.fyber.inneractive.sdk.ui.IFyberAdIdentifier;
/* loaded from: classes2.dex */
public final class e implements IFyberAdIdentifier.ClickListener, f {
public Context a;
public final InneractiveAdRequest b;
public final com.fyber.inneractive.sdk.response.e c;
public final IFyberAdIdentifier d;
public e(Context context, boolean z, InneractiveAdRequest inneractiveAdRequest, com.fyber.inneractive.sdk.response.e eVar, com.fyber.inneractive.sdk.config.global.s sVar) {
this.a = context;
this.b = inneractiveAdRequest;
this.c = eVar;
new FyberAdIdentifierFactory();
IFyberAdIdentifier a = FyberAdIdentifierFactory.a(context, z, sVar);
this.d = a;
a.a(this);
}
public final void a(ViewGroup viewGroup, IFyberAdIdentifier.Corner corner) {
IFyberAdIdentifier iFyberAdIdentifier = this.d;
iFyberAdIdentifier.l = corner;
iFyberAdIdentifier.a(viewGroup);
this.a = viewGroup.getContext();
}
@Override // com.fyber.inneractive.sdk.ui.IFyberAdIdentifier.ClickListener
public final void a() {
Long l;
String str;
com.fyber.inneractive.sdk.response.e eVar = this.c;
String str2 = null;
if (eVar != null) {
ImpressionData impressionData = eVar.r;
String advertiserDomain = impressionData != null ? impressionData.getAdvertiserDomain() : null;
ImpressionData impressionData2 = this.c.r;
str = impressionData2 != null ? impressionData2.getDemandSource() : null;
ImpressionData impressionData3 = this.c.r;
str2 = advertiserDomain;
l = impressionData3 != null ? impressionData3.getDemandId() : null;
} else {
l = null;
str = null;
}
FyberReportAdActivity.start(this.a, this, str2, str, l);
}
}

View File

@@ -0,0 +1,8 @@
package com.fyber.inneractive.sdk.flow;
import com.fyber.inneractive.sdk.config.enums.Skip;
/* loaded from: classes2.dex */
public interface e0 {
Skip a();
}

View File

@@ -0,0 +1,5 @@
package com.fyber.inneractive.sdk.flow;
/* loaded from: classes2.dex */
public interface f {
}

View File

@@ -0,0 +1,86 @@
package com.fyber.inneractive.sdk.flow;
import com.fyber.inneractive.sdk.external.InneractiveAdSpot;
import com.fyber.inneractive.sdk.external.InneractiveContentController;
import com.fyber.inneractive.sdk.external.InneractiveUnitController;
import com.fyber.inneractive.sdk.external.InneractiveUnitController.EventsListener;
import com.fyber.inneractive.sdk.util.IAlog;
import java.lang.ref.WeakReference;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
/* loaded from: classes2.dex */
public abstract class f0<EL extends InneractiveUnitController.EventsListener> implements InneractiveUnitController<EL> {
protected WeakReference<w> mAdSpot;
protected Set<InneractiveContentController> mContentControllers = new HashSet();
protected EL mEventsListener;
protected InneractiveContentController mSelectedContentController;
@Override // com.fyber.inneractive.sdk.external.InneractiveUnitController
public void addContentController(InneractiveContentController inneractiveContentController) {
this.mContentControllers.add(inneractiveContentController);
}
public boolean canRefreshAd() {
return supportsRefresh();
}
@Override // com.fyber.inneractive.sdk.external.InneractiveUnitController
public void destroy() {
Iterator<InneractiveContentController> it = this.mContentControllers.iterator();
while (it.hasNext()) {
it.next().destroy();
}
this.mContentControllers.clear();
this.mSelectedContentController = null;
this.mAdSpot = null;
}
@Override // com.fyber.inneractive.sdk.external.InneractiveUnitController
public InneractiveAdSpot getAdSpot() {
return (w) com.fyber.inneractive.sdk.util.t.a(this.mAdSpot);
}
@Override // com.fyber.inneractive.sdk.external.InneractiveUnitController
public EL getEventsListener() {
return this.mEventsListener;
}
@Override // com.fyber.inneractive.sdk.external.InneractiveUnitController
public InneractiveContentController getSelectedContentController() {
return this.mSelectedContentController;
}
public String logPrefix() {
return IAlog.a(this);
}
public void selectContentController() {
InneractiveAdSpot inneractiveAdSpot = (InneractiveAdSpot) com.fyber.inneractive.sdk.util.t.a(this.mAdSpot);
if (inneractiveAdSpot == null) {
IAlog.f("selectContentController called, but ad spot is null", new Object[0]);
return;
}
for (InneractiveContentController inneractiveContentController : this.mContentControllers) {
x xVar = (x) inneractiveContentController;
if (xVar.canControl(inneractiveAdSpot)) {
this.mSelectedContentController = inneractiveContentController;
xVar.setAdSpot(inneractiveAdSpot);
}
}
}
public void setAdSpot(w wVar) {
this.mAdSpot = new WeakReference<>(wVar);
}
@Override // com.fyber.inneractive.sdk.external.InneractiveUnitController
public void setEventsListener(EL el) {
this.mEventsListener = el;
}
public abstract boolean supports(InneractiveAdSpot inneractiveAdSpot);
public abstract boolean supportsRefresh();
}

View File

@@ -0,0 +1,32 @@
package com.fyber.inneractive.sdk.flow;
/* loaded from: classes2.dex */
public enum g {
UNSPECIFIED,
VAST_NO_MEDIA_FILES,
COULD_NOT_CREATE_FLOW_MANAGER,
COULD_NOT_LOAD_USING_FLOW_MANAGER,
VIDEO_AD_LOAD_TIMEOUT,
VIDEO_FATAL_ERROR,
VIDEO_ERROR_UNSPECIFIED,
VIDEO_ERROR_NULL,
EMPTY_UNIT_DISPLAY_TYPE,
COULD_NOT_CREATE_WEBVIEW_CONTROLLER,
COULD_NOT_CONFIGURE_WEBVIEW,
COULD_NOT_LOAD_TO_WEBVIEW,
COULD_NOT_LOAD_FMP_ENDCARD_TO_WEBVIEW,
WEBVIEW_FMP_ENDCARD_ERROR,
EMPTY_FINAL_HTML,
WEBVIEW_LOAD_TIMEOUT,
NO_APP_CONFIG_AVAILABLE,
NO_CONTENT_LOADER_AVAILABLE,
CONTENT_LOADER_START_FAILED,
COULD_NOT_SELECT_UNIT_CONTROLLER,
NETWORK_ERROR,
VALIDATE_PARAMS_FAILED,
NO_WEBVIEW_CONTROLLER_AVAILABLE,
ADM_FETCH_FAILED,
AD_RELOAD_NOT_ACTIVE,
CONTENT_ERROR_UNSPECIFIED,
NO_TIME_TO_LOAD_AD_CONTENT
}

View File

@@ -0,0 +1,56 @@
package com.fyber.inneractive.sdk.flow;
import com.fyber.inneractive.sdk.config.enums.UnitDisplayType;
import com.fyber.inneractive.sdk.external.InneractiveAdRequest;
import com.fyber.inneractive.sdk.util.IAlog;
/* loaded from: classes2.dex */
public final class g0 extends p<com.fyber.inneractive.sdk.response.g> {
public com.fyber.inneractive.sdk.player.h i;
public boolean j;
public g0(com.fyber.inneractive.sdk.config.f0 f0Var, com.fyber.inneractive.sdk.config.global.s sVar, com.fyber.inneractive.sdk.response.g gVar, InneractiveAdRequest inneractiveAdRequest) {
super(f0Var, sVar);
this.j = false;
a((g0) gVar);
a(inneractiveAdRequest);
}
@Override // com.fyber.inneractive.sdk.flow.q
public final void a() {
if (this.g != null && e()) {
com.fyber.inneractive.sdk.web.u uVar = this.g;
uVar.y = true;
uVar.D = false;
uVar.b.h.remove(uVar);
uVar.i = null;
IAlog.a("destroy internalStoreWebpageController", new Object[0]);
this.g = null;
}
com.fyber.inneractive.sdk.player.h hVar = this.i;
if (hVar != null) {
hVar.a();
this.i = null;
}
}
@Override // com.fyber.inneractive.sdk.flow.q
public final boolean e() {
com.fyber.inneractive.sdk.config.g0 g0Var = ((com.fyber.inneractive.sdk.config.e0) this.d).f;
if (g0Var == null) {
return false;
}
UnitDisplayType unitDisplayType = g0Var.j;
return UnitDisplayType.INTERSTITIAL.equals(unitDisplayType) || UnitDisplayType.REWARDED.equals(unitDisplayType) || UnitDisplayType.VERTICAL.equals(unitDisplayType);
}
@Override // com.fyber.inneractive.sdk.flow.q
public final boolean g() {
return this.i != null;
}
@Override // com.fyber.inneractive.sdk.flow.q
public boolean isVideoAd() {
return true;
}
}

View File

@@ -0,0 +1,230 @@
package com.fyber.inneractive.sdk.flow;
import android.os.Handler;
import android.os.HandlerThread;
import com.fyber.inneractive.sdk.config.IAConfigManager;
import com.fyber.inneractive.sdk.config.enums.UnitDisplayType;
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.flow.q;
import com.fyber.inneractive.sdk.interfaces.a;
import com.fyber.inneractive.sdk.response.e;
import com.fyber.inneractive.sdk.util.IAlog;
import java.util.Locale;
/* loaded from: classes2.dex */
public abstract class h<Response extends com.fyber.inneractive.sdk.response.e, Content extends q> implements com.fyber.inneractive.sdk.interfaces.a, a.b {
public InneractiveAdRequest a;
public Response b;
public Content c;
public a.InterfaceC0074a d;
public a.b e;
public com.fyber.inneractive.sdk.config.e0 f;
public com.fyber.inneractive.sdk.config.global.s g;
public com.fyber.inneractive.sdk.network.timeouts.content.a j;
public boolean h = false;
public int i = 0;
public final a l = new a();
public b k = new b(this);
public class a implements Runnable {
public a() {
}
@Override // java.lang.Runnable
public final void run() {
h hVar = h.this;
hVar.getClass();
IAlog.a("%s : IAAdContentLoaderImpl : retry load ad task started execution", IAlog.a(hVar));
h.this.a();
}
}
public final void b(InneractiveInfrastructureError inneractiveInfrastructureError) {
com.fyber.inneractive.sdk.util.p.a(new c(new d(this.b, this.a, d(), this.g.c()), inneractiveInfrastructureError));
}
public InneractiveInfrastructureError c() {
g gVar = g.WEBVIEW_LOAD_TIMEOUT;
Response response = this.b;
if ("video".equalsIgnoreCase((response == null || com.fyber.inneractive.sdk.response.a.a(response.g) != com.fyber.inneractive.sdk.response.a.RETURNED_ADTYPE_VAST) ? "display" : "video")) {
gVar = g.VIDEO_AD_LOAD_TIMEOUT;
}
return new InneractiveInfrastructureError(InneractiveErrorCode.LOAD_TIMEOUT, gVar);
}
@Override // com.fyber.inneractive.sdk.interfaces.a
public abstract void cancel();
public abstract String d();
public final com.fyber.inneractive.sdk.config.f0 e() {
InneractiveAdRequest inneractiveAdRequest = this.a;
return inneractiveAdRequest == null ? this.f : inneractiveAdRequest.getSelectedUnitConfig();
}
public final void f() {
String str;
this.k.a();
InneractiveAdRequest inneractiveAdRequest = this.a;
if (inneractiveAdRequest != null) {
str = inneractiveAdRequest.b;
} else {
Response response = this.b;
if (response == null || (str = response.z) == null) {
str = null;
}
}
com.fyber.inneractive.sdk.metrics.d.d.a(str).f();
Content content = this.c;
if (content != null) {
content.a(str);
}
a.InterfaceC0074a interfaceC0074a = this.d;
if (interfaceC0074a != null) {
interfaceC0074a.a(this.a);
}
}
public abstract void g();
public final void h() {
int i = this.i;
this.i = i + 1;
com.fyber.inneractive.sdk.network.timeouts.content.a aVar = this.j;
if (aVar != null) {
if (aVar.g) {
i = aVar.a - i;
}
r2 = (i == aVar.a ? aVar.i : 0) + (aVar.b * i) + aVar.d;
}
IAlog.a("%s : IAAdContentLoaderImpl : Start timeout: %d, attempt number: %d", IAlog.a(this), Integer.valueOf(r2), Integer.valueOf(this.i - 1));
b bVar = this.k;
if (bVar.a == null) {
HandlerThread handlerThread = new HandlerThread("TimeoutHandlerThread");
handlerThread.start();
bVar.a = new Handler(handlerThread.getLooper());
}
bVar.a.postDelayed(bVar.d, r2);
g();
}
public void b() {
int i;
InneractiveInfrastructureError inneractiveInfrastructureError;
Object[] objArr = new Object[3];
objArr[0] = IAlog.a(this);
objArr[1] = Integer.valueOf(this.i - 1);
int i2 = this.i - 1;
com.fyber.inneractive.sdk.network.timeouts.content.a aVar = this.j;
if (aVar != null) {
if (aVar.g) {
i2 = aVar.a - i2;
}
i = (aVar.b * i2) + aVar.d + (i2 == aVar.a ? aVar.i : 0);
} else {
i = 0;
}
objArr[2] = Integer.valueOf(i);
IAlog.a("%s : IAAdContentLoaderImpl : onTimeout() attempt: %d timeout: %d", objArr);
a.b bVar = this.e;
if (bVar != null) {
bVar.b();
}
com.fyber.inneractive.sdk.network.timeouts.content.a aVar2 = this.j;
if (this.i <= (aVar2 != null ? aVar2.a : 0)) {
inneractiveInfrastructureError = c();
} else {
inneractiveInfrastructureError = new InneractiveInfrastructureError(InneractiveErrorCode.IN_FLIGHT_TIMEOUT, g.NO_TIME_TO_LOAD_AD_CONTENT);
}
b(inneractiveInfrastructureError);
a(inneractiveInfrastructureError);
}
/* JADX WARN: Multi-variable type inference failed */
public final void a(InneractiveAdRequest inneractiveAdRequest, com.fyber.inneractive.sdk.response.e eVar, com.fyber.inneractive.sdk.config.global.s sVar, a.InterfaceC0074a interfaceC0074a, k kVar) {
String lowerCase;
this.a = inneractiveAdRequest;
this.b = eVar;
this.d = interfaceC0074a;
this.e = kVar;
this.k = new b(this);
this.g = sVar;
UnitDisplayType unitDisplayType = eVar.n;
if (unitDisplayType != UnitDisplayType.INTERSTITIAL && unitDisplayType != UnitDisplayType.REWARDED) {
lowerCase = UnitDisplayType.BANNER.name().toLowerCase(Locale.US);
} else {
lowerCase = unitDisplayType.name().toLowerCase(Locale.US);
}
this.j = new com.fyber.inneractive.sdk.network.timeouts.content.a(lowerCase, com.fyber.inneractive.sdk.response.a.a(eVar.g) == com.fyber.inneractive.sdk.response.a.RETURNED_ADTYPE_VAST ? "video" : "display", (int) eVar.I, eVar.B, IAConfigManager.L.l, this.g);
if (this.a == null) {
this.f = com.fyber.inneractive.sdk.config.a.a(eVar.m);
}
try {
h();
} catch (Throwable th) {
IAlog.f("Failed to start ContentLoader", IAlog.a(this));
com.fyber.inneractive.sdk.network.t.a(th, inneractiveAdRequest, eVar);
this.k.a();
a(new InneractiveInfrastructureError(InneractiveErrorCode.SDK_INTERNAL_ERROR, g.CONTENT_LOADER_START_FAILED));
}
}
@Override // com.fyber.inneractive.sdk.interfaces.a.b
public final void a() {
Object[] objArr = new Object[3];
objArr[0] = IAlog.a(this);
objArr[1] = Integer.valueOf(this.i - 1);
int i = this.i - 1;
com.fyber.inneractive.sdk.network.timeouts.content.a aVar = this.j;
if (aVar != null) {
if (aVar.g) {
i = aVar.a - i;
}
r2 = (i == aVar.a ? aVar.i : 0) + (aVar.b * i) + aVar.d;
}
objArr[2] = Integer.valueOf(r2);
IAlog.a("%s : IAAdContentLoaderImpl : onRetry() attempt: %d timeout: %d", objArr);
a.b bVar = this.e;
if (bVar != null) {
bVar.a();
}
h();
}
public final void a(InneractiveInfrastructureError inneractiveInfrastructureError) {
IAlog.a("%s : IAAdContentLoaderImpl : Handle Retry for error: %s", IAlog.a(this), inneractiveInfrastructureError.getErrorCode().toString());
b bVar = this.k;
bVar.getClass();
IAlog.a("%s : ContentLoadTimeoutHandler stopping timeout handler", IAlog.a(bVar));
Handler handler = bVar.a;
if (handler != null) {
handler.removeCallbacks(bVar.d);
}
com.fyber.inneractive.sdk.network.timeouts.content.a aVar = this.j;
boolean z = this.i <= (aVar != null ? aVar.a : 0);
IAlog.a("%s : IAAdContentLoaderImpl : should retry: %s", IAlog.a(this), Boolean.valueOf(z));
if (z) {
Content content = this.c;
if (content != null) {
content.a();
this.c = null;
}
com.fyber.inneractive.sdk.network.timeouts.content.a aVar2 = this.j;
int i = aVar2 != null ? aVar2.e : 0;
IAlog.a("%s : IAAdContentLoaderImpl : retryLoad : post load ad content retry task with delay: %d", IAlog.a(this), Integer.valueOf(i));
com.fyber.inneractive.sdk.util.p.b.postDelayed(this.l, i);
return;
}
a.InterfaceC0074a interfaceC0074a = this.d;
if (interfaceC0074a != null) {
interfaceC0074a.a(inneractiveInfrastructureError);
}
cancel();
InneractiveAdRequest inneractiveAdRequest = this.a;
Response response = this.b;
com.fyber.inneractive.sdk.config.global.s sVar = this.g;
com.fyber.inneractive.sdk.flow.a.a(inneractiveAdRequest, inneractiveInfrastructureError, this.c, response, sVar != null ? sVar.c() : null);
}
}

View File

@@ -0,0 +1,41 @@
package com.fyber.inneractive.sdk.flow;
import com.fyber.inneractive.sdk.external.VideoContentListener;
/* loaded from: classes2.dex */
public abstract class h0 extends x<VideoContentListener> implements VideoContentListener {
protected boolean isOverlayOutside = true;
public boolean isOverlayOutside() {
return this.isOverlayOutside;
}
public h0 setOverlayOutside(boolean z) {
this.isOverlayOutside = z;
return this;
}
@Override // com.fyber.inneractive.sdk.external.VideoContentListener
public void onCompleted() {
EventsListenerT eventslistenert = this.mEventsListener;
if (eventslistenert != 0) {
((VideoContentListener) eventslistenert).onCompleted();
}
}
@Override // com.fyber.inneractive.sdk.external.VideoContentListener
public void onPlayerError() {
EventsListenerT eventslistenert = this.mEventsListener;
if (eventslistenert != 0) {
((VideoContentListener) eventslistenert).onPlayerError();
}
}
@Override // com.fyber.inneractive.sdk.external.VideoContentListener
public void onProgress(int i, int i2) {
EventsListenerT eventslistenert = this.mEventsListener;
if (eventslistenert != 0) {
((VideoContentListener) eventslistenert).onProgress(i, i2);
}
}
}

View File

@@ -0,0 +1,29 @@
package com.fyber.inneractive.sdk.flow;
import com.fyber.inneractive.sdk.config.IAConfigManager;
import com.fyber.inneractive.sdk.external.InneractiveAdRequest;
import com.fyber.inneractive.sdk.external.InneractiveErrorCode;
import com.fyber.inneractive.sdk.external.InneractiveInfrastructureError;
/* loaded from: classes2.dex */
public final class i implements IAConfigManager.OnConfigurationReadyAndValidListener {
public final /* synthetic */ InneractiveAdRequest a;
public final /* synthetic */ j b;
public i(j jVar, InneractiveAdRequest inneractiveAdRequest) {
this.b = jVar;
this.a = inneractiveAdRequest;
}
@Override // com.fyber.inneractive.sdk.config.IAConfigManager.OnConfigurationReadyAndValidListener
public final void onConfigurationReadyAndValid(IAConfigManager iAConfigManager, boolean z, Exception exc) {
IAConfigManager.removeListener(this);
if (z) {
this.b.c(this.a);
return;
}
InneractiveInfrastructureError inneractiveInfrastructureError = new InneractiveInfrastructureError(exc instanceof com.fyber.inneractive.sdk.network.b ? InneractiveErrorCode.CONNECTION_ERROR : InneractiveErrorCode.SDK_NOT_INITIALIZED_OR_CONFIG_ERROR, g.NO_APP_CONFIG_AVAILABLE, exc);
j jVar = this.b;
jVar.a(this.a, inneractiveInfrastructureError, jVar.c());
}
}

View File

@@ -0,0 +1,21 @@
package com.fyber.inneractive.sdk.flow;
import com.fyber.inneractive.sdk.config.IAConfigManager;
/* loaded from: classes2.dex */
public abstract class i0 {
public boolean a = true;
public String b;
public boolean getAllowFullscreen() {
return this.a;
}
public String getMediationName() {
return IAConfigManager.L.l;
}
public String getMediationVersion() {
return IAConfigManager.L.n;
}
}

View File

@@ -0,0 +1,141 @@
package com.fyber.inneractive.sdk.flow;
import android.text.TextUtils;
import com.fyber.inneractive.sdk.config.IAConfigManager;
import com.fyber.inneractive.sdk.config.enums.UnitDisplayType;
import com.fyber.inneractive.sdk.external.InneractiveAdManager;
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.flow.k;
import com.fyber.inneractive.sdk.network.k;
import com.fyber.inneractive.sdk.network.s;
import com.fyber.inneractive.sdk.util.IAlog;
import java.util.HashMap;
import org.json.JSONArray;
import org.json.JSONObject;
/* loaded from: classes2.dex */
public final class j extends k {
public i g;
public j(String str) {
super(str);
}
public static void a(boolean z, com.fyber.inneractive.sdk.response.e eVar, InneractiveAdRequest inneractiveAdRequest) {
String spotId = inneractiveAdRequest.getSpotId();
IAConfigManager iAConfigManager = IAConfigManager.L;
String str = (String) iAConfigManager.w.c.get("KEY_MISSMATCH_STATS_SPOTS");
if (TextUtils.isEmpty(str)) {
str = "";
}
if (str.contains(String.format("-%s-", spotId))) {
return;
}
s.a aVar = new s.a(com.fyber.inneractive.sdk.network.q.MISSMATCH_SPOTID, inneractiveAdRequest, eVar, (JSONArray) null);
String format = z ? String.format("There is no %s spot ID in current app config", spotId) : String.format("spot ID %s is not active in current app config", spotId);
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("reason", format);
} catch (Exception unused) {
IAlog.f("Got exception adding param to json object: %s, %s", "reason", format);
}
aVar.f.put(jSONObject);
aVar.a((String) null);
iAConfigManager.w.c.put("KEY_MISSMATCH_STATS_SPOTS", String.format("%s -%s-", str, spotId));
}
public final void c(InneractiveAdRequest inneractiveAdRequest) {
k.a aVar;
com.fyber.inneractive.sdk.config.g0 g0Var;
UnitDisplayType unitDisplayType;
k.a aVar2;
if (!InneractiveAdManager.wasInitialized() && (aVar2 = this.b) != null) {
((u) aVar2).a(inneractiveAdRequest, new InneractiveInfrastructureError(InneractiveErrorCode.SDK_NOT_INITIALIZED, g.NO_APP_CONFIG_AVAILABLE), c());
}
String spotId = inneractiveAdRequest.getSpotId();
IAConfigManager iAConfigManager = IAConfigManager.L;
HashMap hashMap = iAConfigManager.a;
com.fyber.inneractive.sdk.config.d0 d0Var = (hashMap == null || !hashMap.containsKey(spotId)) ? null : (com.fyber.inneractive.sdk.config.d0) iAConfigManager.a.get(spotId);
com.fyber.inneractive.sdk.response.e c = c();
if (d0Var != null && !d0Var.b) {
a(false, c, inneractiveAdRequest);
((u) this.b).a(inneractiveAdRequest, new InneractiveInfrastructureError(InneractiveErrorCode.SPOT_DISABLED, g.NO_APP_CONFIG_AVAILABLE), c());
return;
}
if (d0Var == null || !d0Var.a.iterator().hasNext()) {
if (d0Var == null) {
a(true, c, inneractiveAdRequest);
IAConfigManager.a();
}
IAlog.f("************************************************************************************************************************", new Object[0]);
IAlog.f("*** Requested spot id '%s' doesn't exist within this application config - application Id: '%s'", inneractiveAdRequest.getSpotId(), iAConfigManager.c);
IAlog.f("*** Are you sure that you are using the correct application and spot ids, as defined for this application in the Inneractive console?", new Object[0]);
IAlog.f("************************************************************************************************************************", new Object[0]);
((u) this.b).a(inneractiveAdRequest, new InneractiveInfrastructureError(InneractiveErrorCode.ERROR_CONFIGURATION_NO_SUCH_SPOT, g.NO_APP_CONFIG_AVAILABLE), c);
return;
}
com.fyber.inneractive.sdk.config.e0 e0Var = (com.fyber.inneractive.sdk.config.e0) d0Var.a.get(0);
if (e0Var.c == null && ((g0Var = e0Var.f) == null || !((unitDisplayType = g0Var.j) == UnitDisplayType.INTERSTITIAL || unitDisplayType == UnitDisplayType.REWARDED))) {
((u) this.b).a(inneractiveAdRequest, new InneractiveInfrastructureError(InneractiveErrorCode.UNSUPPORTED_SPOT, g.NO_APP_CONFIG_AVAILABLE), c());
return;
}
com.fyber.inneractive.sdk.config.global.s b = com.fyber.inneractive.sdk.config.global.s.b();
this.c = b;
b.a(false, inneractiveAdRequest.getSpotId());
com.fyber.inneractive.sdk.network.p pVar = new com.fyber.inneractive.sdk.network.p(inneractiveAdRequest, inneractiveAdRequest.b, this.c, this);
this.d = pVar;
pVar.b = false;
IAlog.a("IARemoteAdFetcher: requestAd called", new Object[0]);
if (TextUtils.isEmpty(inneractiveAdRequest.getSpotId())) {
IAlog.b("appID is null or empty. Please provide a valid appID and re-try.", new Object[0]);
} else {
if (com.fyber.inneractive.sdk.util.o.b("android.permission.INTERNET")) {
if (!com.fyber.inneractive.sdk.util.o.b("android.permission.ACCESS_NETWORK_STATE")) {
IAlog.b("It is recommended to add ACCESS_NETWORK_STATE permission to the Manifest for better targetting", new Object[0]);
}
if (!com.fyber.inneractive.sdk.util.o.b("android.permission.READ_PHONE_STATE")) {
IAlog.f("It is recomended to add the READ_PHONE_STATE permission to the manifest for better targetting", new Object[0]);
}
iAConfigManager.r.a(pVar.f);
return;
}
IAlog.b("INTERNET permission is missing. Please add it to the Manifest and re-try, otherwise ads will not be requested and displayed! ", new Object[0]);
}
InneractiveInfrastructureError inneractiveInfrastructureError = new InneractiveInfrastructureError(InneractiveErrorCode.INVALID_INPUT, g.VALIDATE_PARAMS_FAILED, new Exception("appID is null or empty or INTERNET permission is missing"));
if (pVar.b || (aVar = pVar.a) == null) {
return;
}
((k) aVar).a(inneractiveAdRequest, inneractiveInfrastructureError, null);
}
@Override // com.fyber.inneractive.sdk.flow.k
public final String d() {
return IAlog.a(this);
}
public final void b(boolean z) {
i iVar = this.g;
if (iVar != null) {
IAConfigManager.removeListener(iVar);
}
com.fyber.inneractive.sdk.network.k kVar = this.d;
if (kVar != null) {
kVar.a();
this.d = null;
}
a(z);
this.b = null;
}
@Override // com.fyber.inneractive.sdk.interfaces.a.b
public final void b() {
IAlog.a("%s onTimeout()", IAlog.a(this));
}
@Override // com.fyber.inneractive.sdk.interfaces.a.b
public final void a() {
IAlog.a("%s onRetry()", IAlog.a(this));
}
}

View File

@@ -0,0 +1,174 @@
package com.fyber.inneractive.sdk.flow;
import com.fyber.inneractive.sdk.external.InneractiveAdRequest;
import com.fyber.inneractive.sdk.external.InneractiveAdSpot;
import com.fyber.inneractive.sdk.external.InneractiveAdViewUnitController;
import com.fyber.inneractive.sdk.external.InneractiveErrorCode;
import com.fyber.inneractive.sdk.external.InneractiveInfrastructureError;
import com.fyber.inneractive.sdk.flow.t;
import com.fyber.inneractive.sdk.interfaces.a;
import com.fyber.inneractive.sdk.network.k;
import com.fyber.inneractive.sdk.util.IAlog;
import java.util.HashMap;
import java.util.Iterator;
/* loaded from: classes2.dex */
public abstract class k implements k.a, a.InterfaceC0074a, a.b {
public com.fyber.inneractive.sdk.interfaces.a a;
public a b;
public com.fyber.inneractive.sdk.config.global.s c;
public com.fyber.inneractive.sdk.network.k d;
public final String e;
public boolean f = false;
public interface a {
}
public k(String str) {
this.e = str;
}
public final void a(InneractiveAdRequest inneractiveAdRequest, InneractiveInfrastructureError inneractiveInfrastructureError, com.fyber.inneractive.sdk.response.e eVar) {
if (IAlog.a <= 3) {
Thread.dumpStack();
}
IAlog.e("%sgot onAdRequestFailed! with: %s", d(), inneractiveInfrastructureError.getErrorCode());
if (this.b != null) {
if (eVar != null && eVar.i != null) {
inneractiveInfrastructureError.setCause(new Exception(eVar.i + ": " + eVar.j));
}
((u) this.b).a(inneractiveAdRequest, inneractiveInfrastructureError, eVar);
}
}
public void a(InneractiveAdRequest inneractiveAdRequest, com.fyber.inneractive.sdk.response.e eVar) {
}
public void b(InneractiveAdRequest inneractiveAdRequest) {
}
public final com.fyber.inneractive.sdk.response.e c() {
Content content;
com.fyber.inneractive.sdk.interfaces.a aVar = this.a;
if (aVar == null || (content = ((h) aVar).c) == 0) {
return null;
}
return content.d();
}
public String d() {
return IAlog.a(this);
}
@Override // com.fyber.inneractive.sdk.interfaces.a.InterfaceC0074a
public void a(InneractiveAdRequest inneractiveAdRequest) {
T t;
f0 f0Var;
IAlog.e("%sgot onAdLoaded!", d());
com.fyber.inneractive.sdk.interfaces.a aVar = this.a;
if (aVar != null) {
a aVar2 = this.b;
if (aVar2 != null) {
Content content = ((h) aVar).c;
u uVar = (u) aVar2;
t tVar = uVar.a;
if (!tVar.j && (f0Var = tVar.f) != null && f0Var.supportsRefresh()) {
if (uVar.a.f.canRefreshAd()) {
t tVar2 = uVar.a;
tVar2.e = content;
content.a = inneractiveAdRequest;
t.c cVar = tVar2.i;
if (cVar != null) {
cVar.onAdRefreshed(tVar2);
} else {
f0 f0Var2 = tVar2.f;
if (f0Var2 instanceof InneractiveAdViewUnitController) {
((InneractiveAdViewUnitController) f0Var2).onAdRefreshed(tVar2);
}
}
} else {
t tVar3 = uVar.a;
tVar3.getClass();
IAlog.a("%sad loaded successfully, but the selected unit controller has rejected the refresh!", IAlog.a(tVar3));
t tVar4 = uVar.a;
tVar4.i.onAdRefreshFailed(tVar4, InneractiveErrorCode.CANCELLED);
}
} else {
t tVar5 = uVar.a;
tVar5.e = content;
content.a = inneractiveAdRequest;
Iterator it = tVar5.g.iterator();
while (it.hasNext()) {
f0 f0Var3 = (f0) it.next();
if (f0Var3.supports(tVar5)) {
tVar5.f = f0Var3;
t tVar6 = uVar.a;
InneractiveAdSpot.RequestListener requestListener = tVar6.b;
if (requestListener != null) {
requestListener.onInneractiveSuccessfulAdRequest(tVar6);
}
uVar.a.j = false;
}
}
t tVar7 = uVar.a;
tVar7.getClass();
IAlog.a("%sCannot find appropriate unit controller for unit: %s", IAlog.a(tVar7), uVar.a.e.d);
j jVar = uVar.a.h;
com.fyber.inneractive.sdk.response.e c = jVar != null ? jVar.c() : null;
uVar.a(inneractiveAdRequest, new InneractiveInfrastructureError(InneractiveErrorCode.INVALID_INPUT, g.COULD_NOT_SELECT_UNIT_CONTROLLER, new Exception("Cannot find appropriate unit controller for unit: " + uVar.a.e.d)), c);
t tVar8 = uVar.a;
tVar8.e = null;
tVar8.j = false;
}
String str = uVar.a.a;
com.fyber.inneractive.sdk.metrics.d dVar = com.fyber.inneractive.sdk.metrics.d.d;
dVar.a(str).h();
dVar.a(str).b();
t tVar9 = uVar.a;
q qVar = tVar9.e;
if (qVar != null && (t = qVar.b) != 0 && t.n != null) {
q qVar2 = tVar9.e;
T t2 = qVar2.b;
InneractiveAdRequest inneractiveAdRequest2 = tVar9.c;
String str2 = tVar9.a;
com.fyber.inneractive.sdk.metrics.c cVar2 = new com.fyber.inneractive.sdk.metrics.c(t2, inneractiveAdRequest2, str2, t2.n, qVar2.c.c());
com.fyber.inneractive.sdk.metrics.g a2 = dVar.a(str2);
HashMap j = a2.j();
if (!a2.a()) {
IAlog.a("MetricCreativeReporter: Metric data not valid, data: %s", dVar.a(str2).toString());
} else {
dVar.a.remove(str2);
com.fyber.inneractive.sdk.util.p.a.execute(new com.fyber.inneractive.sdk.metrics.b(cVar2, a2, j));
}
}
}
this.a = null;
}
b(inneractiveAdRequest);
}
@Override // com.fyber.inneractive.sdk.interfaces.a.InterfaceC0074a
public final void a(InneractiveInfrastructureError inneractiveInfrastructureError) {
Content content;
IAlog.e("%sgot onFailedLoading! with: %s", d(), inneractiveInfrastructureError);
com.fyber.inneractive.sdk.interfaces.a aVar = this.a;
InneractiveAdRequest inneractiveAdRequest = (aVar == null || (content = ((h) aVar).c) == 0) ? null : content.a;
com.fyber.inneractive.sdk.response.e c = c();
IAlog.e("%sgot handleFailedLoading! with: %s", d(), inneractiveInfrastructureError);
a aVar2 = this.b;
if (aVar2 != null) {
((u) aVar2).a(inneractiveAdRequest, inneractiveInfrastructureError, c);
}
a(inneractiveAdRequest, c);
}
public void a(boolean z) {
this.f = true;
com.fyber.inneractive.sdk.interfaces.a aVar = this.a;
if (aVar == null || !z) {
return;
}
aVar.cancel();
this.a = null;
}
}

View File

@@ -0,0 +1,68 @@
package com.fyber.inneractive.sdk.flow;
import com.fyber.inneractive.sdk.config.IAConfigManager;
import com.fyber.inneractive.sdk.external.InneractiveAdRequest;
import com.fyber.inneractive.sdk.external.InneractiveErrorCode;
import com.fyber.inneractive.sdk.external.InneractiveInfrastructureError;
/* loaded from: classes2.dex */
public final class l extends k implements IAConfigManager.OnConfigurationReadyAndValidListener {
public com.fyber.inneractive.sdk.response.e g;
public l(String str) {
super(str);
}
@Override // com.fyber.inneractive.sdk.flow.k, com.fyber.inneractive.sdk.interfaces.a.InterfaceC0074a
public final void a(InneractiveAdRequest inneractiveAdRequest) {
com.fyber.inneractive.sdk.metrics.d.d.b(this.e).a("success");
super.a(inneractiveAdRequest);
}
@Override // com.fyber.inneractive.sdk.interfaces.a.b
public final void b() {
com.fyber.inneractive.sdk.metrics.d.d.b(this.e).a("dyn_timeout");
}
@Override // com.fyber.inneractive.sdk.config.IAConfigManager.OnConfigurationReadyAndValidListener
public final void onConfigurationReadyAndValid(IAConfigManager iAConfigManager, boolean z, Exception exc) {
IAConfigManager.removeListener(this);
if (z) {
return;
}
a(null, new InneractiveInfrastructureError(InneractiveErrorCode.SDK_INTERNAL_ERROR, g.NO_APP_CONFIG_AVAILABLE, exc), c());
}
@Override // com.fyber.inneractive.sdk.flow.k
public final void b(InneractiveAdRequest inneractiveAdRequest) {
a(inneractiveAdRequest, this.g);
}
@Override // com.fyber.inneractive.sdk.interfaces.a.b
public final void a() {
com.fyber.inneractive.sdk.metrics.d.d.b(this.e).a("retrying");
}
@Override // com.fyber.inneractive.sdk.flow.k
public final void a(boolean z) {
com.fyber.inneractive.sdk.network.k kVar = this.d;
if (kVar != null) {
kVar.a();
}
super.a(z);
}
@Override // com.fyber.inneractive.sdk.flow.k
public final void a(InneractiveAdRequest inneractiveAdRequest, com.fyber.inneractive.sdk.response.e eVar) {
String str;
if (eVar == null || (str = eVar.z) == null) {
return;
}
com.fyber.inneractive.sdk.metrics.h b = com.fyber.inneractive.sdk.metrics.d.d.b(str);
com.fyber.inneractive.sdk.config.global.s sVar = this.c;
if (sVar == null) {
sVar = com.fyber.inneractive.sdk.config.global.s.b();
}
b.a(sVar, inneractiveAdRequest, eVar);
}
}

View File

@@ -0,0 +1,500 @@
package com.fyber.inneractive.sdk.flow;
import android.app.Application;
import android.content.Context;
import android.graphics.Bitmap;
import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;
import com.fyber.inneractive.sdk.R;
import com.fyber.inneractive.sdk.config.IAConfigManager;
import com.fyber.inneractive.sdk.external.InneractiveAdRequest;
import com.fyber.inneractive.sdk.external.InneractiveInfrastructureError;
import com.fyber.inneractive.sdk.factories.b;
import com.fyber.inneractive.sdk.flow.vast.a;
import com.fyber.inneractive.sdk.network.m0;
import com.fyber.inneractive.sdk.network.n0;
import com.fyber.inneractive.sdk.network.s;
import com.fyber.inneractive.sdk.util.IAlog;
import com.fyber.inneractive.sdk.util.b1;
import com.fyber.inneractive.sdk.web.f;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.PriorityQueue;
import org.json.JSONArray;
import org.json.JSONObject;
/* loaded from: classes2.dex */
public final class m {
public final int a;
public final InneractiveAdRequest b;
public final com.fyber.inneractive.sdk.response.g c;
public final com.fyber.inneractive.sdk.config.global.s d;
public final com.fyber.inneractive.sdk.model.vast.b e;
public final Context f;
public boolean g;
public n0 h;
public m0 i;
public final com.fyber.inneractive.sdk.flow.vast.b j;
public int k;
public final com.fyber.inneractive.sdk.flow.vast.c m;
public final PriorityQueue<com.fyber.inneractive.sdk.flow.vast.a> l = new PriorityQueue<>(10, new a.b());
public com.fyber.inneractive.sdk.player.controller.c n = null;
public final a o = new a();
public final b p = new b();
public final c q = new c();
public class a implements f.b {
public a() {
}
@Override // com.fyber.inneractive.sdk.web.f.b
public final void a(com.fyber.inneractive.sdk.web.f fVar) {
IAlog.a("%s Fetching companion fmp successfully ", IAlog.a(m.this));
m.this.m.a = fVar != null;
}
@Override // com.fyber.inneractive.sdk.web.f.b
public final void a(InneractiveInfrastructureError inneractiveInfrastructureError) {
IAlog.a("%s Fetching companion fmp failed! will load default companion", IAlog.a(m.this));
m mVar = m.this;
mVar.m.a = false;
m.a(mVar, inneractiveInfrastructureError.getCause());
}
}
public class b implements com.fyber.inneractive.sdk.network.w<String> {
public b() {
}
@Override // com.fyber.inneractive.sdk.network.w
public final void a(String str, Exception exc, boolean z) {
String str2 = str;
if (str2 != null) {
m mVar = m.this;
if (mVar.e != null) {
com.fyber.inneractive.sdk.flow.vast.c cVar = mVar.m;
if (!cVar.i) {
IAlog.a("FmpEndcardLoadingStarted", new Object[0]);
cVar.i = true;
String str3 = str2.concat("<title>Digital Turbine FMP Endcard</title>") + "<style>body{margin: 0px;}</style>";
m mVar2 = m.this;
com.fyber.inneractive.sdk.flow.vast.c cVar2 = mVar2.m;
cVar2.j = z;
cVar2.g.a(str3, (f.b) mVar2.o, false);
return;
}
}
}
if (exc == null || (exc instanceof com.fyber.inneractive.sdk.network.f) || z) {
return;
}
m.a(m.this, exc);
}
}
public class c implements com.fyber.inneractive.sdk.network.w<String> {
public c() {
}
@Override // com.fyber.inneractive.sdk.network.w
public final void a(String str, Exception exc, boolean z) {
com.fyber.inneractive.sdk.model.vast.n nVar;
com.fyber.inneractive.sdk.model.vast.n nVar2;
String str2 = str;
ArrayList arrayList = null;
arrayList = null;
if (str2 != null && exc == null) {
m mVar = m.this;
com.fyber.inneractive.sdk.model.vast.b bVar = mVar.e;
if (bVar == null || (nVar2 = bVar.f) == null) {
return;
}
nVar2.d = str2;
IAlog.a("sending fmpHtmlRequest", new Object[0]);
com.fyber.inneractive.sdk.model.vast.h.FMP_End_Card.name();
com.fyber.inneractive.sdk.config.global.s sVar = mVar.d;
String a = sVar != null ? ((com.fyber.inneractive.sdk.config.global.features.f) sVar.a(com.fyber.inneractive.sdk.config.global.features.f.class)).a(CampaignEx.ENDCARD_URL, "") : null;
if (TextUtils.isEmpty(a)) {
return;
}
IAConfigManager.L.r.a(new com.fyber.inneractive.sdk.network.g0(mVar.p, mVar.f, new com.fyber.inneractive.sdk.cache.c(a)));
return;
}
if (!m.a(m.this)) {
m.a(m.this, new Exception(String.format("Fail to load image: %s", m.this.i.p), exc));
return;
}
m mVar2 = m.this;
com.fyber.inneractive.sdk.model.vast.b bVar2 = mVar2.e;
if (bVar2 != null && (nVar = bVar2.f) != null) {
arrayList = nVar.c;
}
if (arrayList == null || arrayList.size() <= 0) {
return;
}
String str3 = (String) arrayList.remove(0);
if (TextUtils.isEmpty(str3)) {
return;
}
m0 m0Var = new m0(mVar2.q, str3);
mVar2.i = m0Var;
IAConfigManager.L.r.a(m0Var);
}
}
public class d implements f.b {
public final /* synthetic */ com.fyber.inneractive.sdk.flow.vast.e a;
public final /* synthetic */ com.fyber.inneractive.sdk.model.vast.c b;
public d(com.fyber.inneractive.sdk.flow.vast.e eVar, com.fyber.inneractive.sdk.model.vast.c cVar) {
this.a = eVar;
this.b = cVar;
}
@Override // com.fyber.inneractive.sdk.web.f.b
public final void a(com.fyber.inneractive.sdk.web.f fVar) {
if (fVar != null) {
com.fyber.inneractive.sdk.flow.vast.e eVar = this.a;
eVar.a = true;
m.this.l.add(eVar);
}
}
/* JADX WARN: Removed duplicated region for block: B:14:0x005f */
@Override // com.fyber.inneractive.sdk.web.f.b
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void a(com.fyber.inneractive.sdk.external.InneractiveInfrastructureError r6) {
/*
r5 = this;
java.lang.StringBuilder r6 = new java.lang.StringBuilder
r6.<init>()
com.fyber.inneractive.sdk.flow.m r0 = com.fyber.inneractive.sdk.flow.m.this
java.lang.String r0 = com.fyber.inneractive.sdk.util.IAlog.a(r0)
r6.append(r0)
java.lang.String r0 = " Fetching companion html failed!"
r6.append(r0)
java.lang.String r6 = r6.toString()
r0 = 0
java.lang.Object[] r1 = new java.lang.Object[r0]
com.fyber.inneractive.sdk.util.IAlog.a(r6, r1)
com.fyber.inneractive.sdk.model.vast.j r6 = com.fyber.inneractive.sdk.model.vast.j.Gif
com.fyber.inneractive.sdk.model.vast.c r1 = r5.b
com.fyber.inneractive.sdk.model.vast.j r1 = r1.b
boolean r6 = r6.equals(r1)
if (r6 == 0) goto L38
com.fyber.inneractive.sdk.model.vast.c r6 = r5.b
java.lang.String r1 = r6.f
com.fyber.inneractive.sdk.model.vast.j r6 = r6.b
boolean r6 = com.fyber.inneractive.sdk.util.b1.a(r1, r6)
if (r6 == 0) goto L36
goto L38
L36:
r6 = r0
goto L39
L38:
r6 = 1
L39:
com.fyber.inneractive.sdk.flow.vast.e r1 = r5.a
r1.a = r0
com.fyber.inneractive.sdk.flow.m r1 = com.fyber.inneractive.sdk.flow.m.this
int r2 = r1.k
int r3 = r1.a
if (r2 > r3) goto L5c
if (r6 == 0) goto L5c
java.lang.String r6 = com.fyber.inneractive.sdk.util.IAlog.a(r5)
java.lang.Object[] r6 = new java.lang.Object[]{r6}
java.lang.String r0 = "%sloadHtmlCompanion retry"
com.fyber.inneractive.sdk.util.IAlog.a(r0, r6)
com.fyber.inneractive.sdk.flow.m r6 = com.fyber.inneractive.sdk.flow.m.this
com.fyber.inneractive.sdk.model.vast.c r0 = r5.b
r6.a(r0)
goto L81
L5c:
r2 = 0
if (r6 != 0) goto L6d
com.fyber.inneractive.sdk.network.s$a r6 = new com.fyber.inneractive.sdk.network.s$a
com.fyber.inneractive.sdk.network.q r3 = com.fyber.inneractive.sdk.network.q.VAST_COMPANION_INCOMPATIBLE_MIMETYPE
com.fyber.inneractive.sdk.external.InneractiveAdRequest r4 = r1.b
com.fyber.inneractive.sdk.response.g r1 = r1.c
r6.<init>(r3, r4, r1, r2)
r6.a(r2)
L6d:
com.fyber.inneractive.sdk.flow.m r6 = com.fyber.inneractive.sdk.flow.m.this
com.fyber.inneractive.sdk.model.vast.c r1 = r5.b
org.json.JSONObject r1 = r1.a()
com.fyber.inneractive.sdk.flow.m.a(r6, r1, r2)
com.fyber.inneractive.sdk.flow.vast.e r6 = r5.a
r6.a = r0
com.fyber.inneractive.sdk.flow.m r6 = com.fyber.inneractive.sdk.flow.m.this
r6.b()
L81:
return
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.flow.m.d.a(com.fyber.inneractive.sdk.external.InneractiveInfrastructureError):void");
}
}
public class e implements com.fyber.inneractive.sdk.network.w<n0.a> {
public final /* synthetic */ com.fyber.inneractive.sdk.model.vast.c a;
public e(com.fyber.inneractive.sdk.model.vast.c cVar) {
this.a = cVar;
}
@Override // com.fyber.inneractive.sdk.network.w
public final void a(n0.a aVar, Exception exc, boolean z) {
Bitmap bitmap;
View view;
n0.a aVar2 = aVar;
m.this.getClass();
com.fyber.inneractive.sdk.flow.vast.a a = m.a();
m.this.getClass();
if (exc == null && aVar2 != null && aVar2.b == null && (bitmap = aVar2.a) != null && (view = a.b) != null) {
((ImageView) view).setImageBitmap(bitmap);
a.a = true;
m.this.l.add(a);
return;
}
IAlog.a("%s Fetching companion image failed!", IAlog.a(m.this));
com.fyber.inneractive.sdk.model.vast.c cVar = this.a;
boolean a2 = b1.a(cVar.f, cVar.b);
m.this.getClass();
if ((aVar2 == null || (aVar2.b != null && ((exc instanceof com.fyber.inneractive.sdk.network.b) || (exc instanceof UnknownHostException)))) && a2) {
m mVar = m.this;
if (mVar.k <= mVar.a) {
IAlog.a("%sloadStaticCompanion retry", IAlog.a(this));
m.this.b(this.a);
return;
}
}
String str = null;
if (!a2) {
m mVar2 = m.this;
mVar2.getClass();
new s.a(com.fyber.inneractive.sdk.network.q.VAST_COMPANION_INCOMPATIBLE_MIMETYPE, mVar2.b, mVar2.c, (JSONArray) null).a((String) null);
}
if (aVar2 != null && !TextUtils.isEmpty(aVar2.b)) {
str = aVar2.b;
}
m.a(m.this, this.a.a(), str);
m.this.b();
}
}
public m(Application application, com.fyber.inneractive.sdk.response.g gVar, InneractiveAdRequest inneractiveAdRequest, com.fyber.inneractive.sdk.config.global.s sVar, com.fyber.inneractive.sdk.flow.vast.b bVar) {
com.fyber.inneractive.sdk.model.vast.b d2 = gVar.d();
this.e = d2;
this.f = application;
this.c = gVar;
this.b = inneractiveAdRequest;
this.d = sVar;
this.a = IAConfigManager.c().a().a(2, 0, "companion_retry_count");
this.j = bVar;
com.fyber.inneractive.sdk.web.a aVar = new com.fyber.inneractive.sdk.web.a(d2);
com.fyber.inneractive.sdk.flow.vast.c cVar = new com.fyber.inneractive.sdk.flow.vast.c(new com.fyber.inneractive.sdk.player.controller.c(application, bVar, com.fyber.inneractive.sdk.model.vast.h.FMP_End_Card, aVar));
this.m = cVar;
aVar.a(cVar);
}
public static void a(m mVar, JSONObject jSONObject, String str) {
mVar.getClass();
s.a aVar = new s.a(com.fyber.inneractive.sdk.network.q.VAST_COMPANION_FAILED_LOADING, mVar.b, mVar.c, mVar.d.c());
JSONObject jSONObject2 = new JSONObject();
try {
jSONObject2.put("companion_data", jSONObject);
} catch (Exception unused) {
IAlog.f("Got exception adding param to json object: %s, %s", "companion_data", jSONObject);
}
if (!TextUtils.isEmpty(str)) {
try {
jSONObject2.put("reason", str);
} catch (Exception unused2) {
IAlog.f("Got exception adding param to json object: %s, %s", "reason", str);
}
}
aVar.f.put(jSONObject2);
aVar.a((String) null);
}
public final void b(com.fyber.inneractive.sdk.model.vast.c cVar) {
com.fyber.inneractive.sdk.network.r rVar = com.fyber.inneractive.sdk.network.r.VAST_COMPANION_LOAD_ATTEMPT;
InneractiveAdRequest inneractiveAdRequest = this.b;
com.fyber.inneractive.sdk.response.g gVar = this.c;
com.fyber.inneractive.sdk.config.global.s sVar = this.d;
new s.a(rVar, inneractiveAdRequest, gVar, sVar == null ? null : sVar.c()).a((String) null);
int i = IAlog.a;
cVar.a.name();
this.k++;
n0 n0Var = new n0(new e(cVar), cVar.f, this.d);
this.h = n0Var;
IAConfigManager.L.r.a(n0Var);
}
public final void c() {
com.fyber.inneractive.sdk.model.vast.n nVar;
com.fyber.inneractive.sdk.model.vast.b bVar = this.e;
if (bVar == null || (nVar = bVar.f) == null) {
return;
}
ArrayList arrayList = (bVar == null || nVar == null) ? null : nVar.c;
if (arrayList == null || arrayList.size() <= 0) {
return;
}
String str = (String) arrayList.remove(0);
if (TextUtils.isEmpty(str)) {
return;
}
m0 m0Var = new m0(this.q, str);
this.i = m0Var;
IAConfigManager.L.r.a(m0Var);
}
public final void b() {
boolean z = true;
if (this.l.size() == 1) {
return;
}
IAlog.a("%sloadNextVastCompanion called", IAlog.a(this));
this.g = false;
if (this.e == null) {
IAlog.a("%svast data is null! Object must have already been destroyed", IAlog.a(this));
z = false;
}
if (this.e.g.size() == 0) {
IAlog.b("%sgetNextIAvastCompanion - No companion ads found", IAlog.a(this));
} else if (z) {
com.fyber.inneractive.sdk.model.vast.b bVar = this.e;
com.fyber.inneractive.sdk.model.vast.c poll = bVar.g.poll();
bVar.i = poll;
IAlog.a("%sgetNextIAvastCompanion returning: %s", IAlog.a(this), poll);
this.k = 0;
if (poll != null) {
if (poll.a == com.fyber.inneractive.sdk.model.vast.h.Static && !com.fyber.inneractive.sdk.model.vast.j.Gif.equals(poll.b)) {
b(poll);
return;
} else {
a(poll);
return;
}
}
return;
}
IAlog.a("%sno more companion ads available.", IAlog.a(this));
}
public static boolean a(m mVar) {
com.fyber.inneractive.sdk.model.vast.n nVar;
ArrayList arrayList;
com.fyber.inneractive.sdk.model.vast.b bVar = mVar.e;
return (bVar == null || (nVar = bVar.f) == null || (arrayList = nVar.c) == null || arrayList.size() <= 0) ? false : true;
}
public static void a(m mVar, Throwable th) {
com.fyber.inneractive.sdk.web.a aVar;
com.fyber.inneractive.sdk.config.global.s sVar = mVar.d;
JSONArray c2 = sVar == null ? null : sVar.c();
com.fyber.inneractive.sdk.flow.vast.c cVar = mVar.m;
InneractiveAdRequest inneractiveAdRequest = mVar.b;
com.fyber.inneractive.sdk.response.g gVar = mVar.c;
cVar.getClass();
IAlog.a("sending FMP_COMPANION_FAILED_LOADING event", new Object[0]);
s.a aVar2 = new s.a(com.fyber.inneractive.sdk.network.q.FMP_COMPANION_FAILED_LOADING, inneractiveAdRequest, gVar, c2);
JSONObject jSONObject = new JSONObject();
String message = th != null ? th.getMessage() : null;
com.fyber.inneractive.sdk.web.g0 g0Var = cVar.g.a;
String str = (!(g0Var instanceof com.fyber.inneractive.sdk.web.b) || (aVar = ((com.fyber.inneractive.sdk.web.b) g0Var).O) == null) ? null : aVar.b;
if (!TextUtils.isEmpty(message)) {
try {
jSONObject.put("error", message);
} catch (Exception unused) {
IAlog.f("Got exception adding param to json object: %s, %s", "error", message);
}
}
if (!TextUtils.isEmpty(str)) {
try {
jSONObject.put("version", str);
} catch (Exception unused2) {
IAlog.f("Got exception adding param to json object: %s, %s", "version", str);
}
}
Boolean valueOf = Boolean.valueOf(cVar.j);
try {
jSONObject.put("loaded_from_cache", valueOf);
} catch (Exception unused3) {
IAlog.f("Got exception adding param to json object: %s, %s", "loaded_from_cache", valueOf);
}
aVar2.f.put(jSONObject);
aVar2.a((String) null);
}
public final void a(com.fyber.inneractive.sdk.model.vast.c cVar) {
boolean containsKey;
String str;
int i = com.fyber.inneractive.sdk.util.u.a[com.fyber.inneractive.sdk.util.w.Mraid.ordinal()];
if (i == 1) {
containsKey = b.a.a.a.containsKey(com.fyber.inneractive.sdk.response.a.RETURNED_ADTYPE_HTML);
} else if (i != 2) {
return;
} else {
containsKey = b.a.a.a.containsKey(com.fyber.inneractive.sdk.response.a.RETURNED_ADTYPE_VAST);
}
if (containsKey) {
com.fyber.inneractive.sdk.network.r rVar = com.fyber.inneractive.sdk.network.r.VAST_COMPANION_LOAD_ATTEMPT;
InneractiveAdRequest inneractiveAdRequest = this.b;
com.fyber.inneractive.sdk.response.g gVar = this.c;
com.fyber.inneractive.sdk.config.global.s sVar = this.d;
new s.a(rVar, inneractiveAdRequest, gVar, sVar == null ? null : sVar.c()).a((String) null);
this.k++;
int i2 = IAlog.a;
cVar.a.name();
com.fyber.inneractive.sdk.player.controller.c cVar2 = new com.fyber.inneractive.sdk.player.controller.c(this.f, this.j, cVar.a, null);
com.fyber.inneractive.sdk.flow.vast.e eVar = new com.fyber.inneractive.sdk.flow.vast.e(cVar2);
d dVar = new d(eVar, cVar);
String str2 = cVar.f;
com.fyber.inneractive.sdk.model.vast.h hVar = cVar.a;
if (hVar == com.fyber.inneractive.sdk.model.vast.h.Iframe) {
String c2 = com.fyber.inneractive.sdk.util.o.c("fyb_iframe_endcard_tmpl.html");
if (!TextUtils.isEmpty(c2)) {
str2 = c2.replace("$__IMGSRC__$", cVar.f).replace("$__SrcIframeUrl__$", cVar.f);
}
} else if (hVar == com.fyber.inneractive.sdk.model.vast.h.Static && cVar.b == com.fyber.inneractive.sdk.model.vast.j.Gif) {
eVar.g.b();
com.fyber.inneractive.sdk.web.g0 g0Var = eVar.g.a;
if (g0Var != null) {
g0Var.F = false;
}
String c3 = com.fyber.inneractive.sdk.util.o.c("fyb_static_endcard_tmpl.html");
if (!TextUtils.isEmpty(c3)) {
str2 = c3.replace("$__IMGSRC__$", cVar.f);
}
if (!TextUtils.isEmpty(str2) && (str = cVar.g) != null) {
str2 = str2.replace("$__IMGHREF__$", str.replace("\"", "\\\""));
}
}
com.fyber.inneractive.sdk.web.g0 g0Var2 = cVar2.a;
if (g0Var2 != null) {
if (g0Var2.r == null) {
g0Var2.setAdRequest(this.b);
}
if (g0Var2.t == null) {
g0Var2.setAdResponse(this.c);
}
}
cVar2.a(str2, (f.b) dVar, true);
}
}
public static com.fyber.inneractive.sdk.flow.vast.a a() {
com.fyber.inneractive.sdk.flow.vast.a aVar = new com.fyber.inneractive.sdk.flow.vast.a();
ImageView imageView = new ImageView(IAConfigManager.L.u.a());
aVar.b = imageView;
imageView.setId(R.id.ia_inneractive_vast_endcard_static);
aVar.b.setContentDescription("inneractive_vast_endcard_static");
return aVar;
}
}

View File

@@ -0,0 +1,146 @@
package com.fyber.inneractive.sdk.flow;
import com.fyber.inneractive.sdk.config.enums.UnitDisplayType;
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.s;
import com.fyber.inneractive.sdk.ui.IAmraidWebViewController;
import com.fyber.inneractive.sdk.util.IAlog;
import com.fyber.inneractive.sdk.web.f;
import org.json.JSONArray;
/* loaded from: classes2.dex */
public final class n extends h<com.fyber.inneractive.sdk.response.f, c0> {
public IAmraidWebViewController m;
public final a n = new a();
public static /* synthetic */ class b {
public static final /* synthetic */ int[] a;
static {
int[] iArr = new int[UnitDisplayType.values().length];
a = iArr;
try {
iArr[UnitDisplayType.INTERSTITIAL.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
a[UnitDisplayType.REWARDED.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
}
}
@Override // com.fyber.inneractive.sdk.flow.h
public final String d() {
return "send_failed_display_creatives";
}
/* JADX WARN: Removed duplicated region for block: B:36:0x00d1 */
/* JADX WARN: Removed duplicated region for block: B:84:? A[RETURN, SYNTHETIC] */
/* JADX WARN: Type inference failed for: r1v1, types: [Response extends com.fyber.inneractive.sdk.response.e, T extends com.fyber.inneractive.sdk.response.e] */
@Override // com.fyber.inneractive.sdk.flow.h
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void g() {
/*
Method dump skipped, instructions count: 433
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.flow.n.g():void");
}
@Override // com.fyber.inneractive.sdk.flow.h, com.fyber.inneractive.sdk.interfaces.a.b
public final void b() {
IAmraidWebViewController iAmraidWebViewController;
IAlog.a("%s : IAMraidContentLoader : destroyController", IAlog.a(this));
if (this.c != 0 && (iAmraidWebViewController = this.m) != null) {
com.fyber.inneractive.sdk.measurement.tracker.c cVar = iAmraidWebViewController.J;
if (cVar != null) {
cVar.a(false);
}
this.m.d();
this.m = null;
}
super.b();
}
@Override // com.fyber.inneractive.sdk.flow.h
public final InneractiveInfrastructureError c() {
com.fyber.inneractive.sdk.network.timeouts.content.a aVar = this.j;
if (aVar != null) {
int i = this.i;
if (aVar.g) {
i = aVar.a - i;
}
r1 = (i == aVar.a ? aVar.i : 0) + (aVar.b * i) + aVar.d;
}
return new InneractiveInfrastructureError(InneractiveErrorCode.LOAD_TIMEOUT, g.WEBVIEW_LOAD_TIMEOUT, new Exception("LoadTimeout after " + r1 + " ms"));
}
@Override // com.fyber.inneractive.sdk.flow.h, com.fyber.inneractive.sdk.interfaces.a
public final void cancel() {
IAmraidWebViewController iAmraidWebViewController;
IAlog.a("%s : IAMraidContentLoader : destroyController", IAlog.a(this));
if (this.c != 0 && (iAmraidWebViewController = this.m) != null) {
com.fyber.inneractive.sdk.measurement.tracker.c cVar = iAmraidWebViewController.J;
if (cVar != null) {
cVar.a(false);
}
this.m.d();
this.m = null;
}
this.k.a();
IAlog.a("%s: IAAdContentLoaderImpl : cancel load ad content retry task", IAlog.a(this));
com.fyber.inneractive.sdk.util.p.b.removeCallbacks(this.l);
this.a = null;
this.b = null;
this.c = null;
this.d = null;
this.e = null;
this.f = null;
}
public class a implements f.b {
public a() {
}
@Override // com.fyber.inneractive.sdk.web.f.b
public final void a(com.fyber.inneractive.sdk.web.f fVar) {
n nVar = n.this;
nVar.getClass();
IAlog.a("%sweb view returned onReady!", IAlog.a(nVar));
Response response = n.this.b;
UnitDisplayType unitDisplayType = response != 0 ? ((com.fyber.inneractive.sdk.response.f) response).n : null;
if (unitDisplayType != null && unitDisplayType.isFullscreenUnit()) {
n nVar2 = n.this;
nVar2.getClass();
try {
com.fyber.inneractive.sdk.network.r rVar = com.fyber.inneractive.sdk.network.r.EVENT_READY_ON_CLIENT;
InneractiveAdRequest inneractiveAdRequest = nVar2.a;
Content content = nVar2.c;
new s.a(rVar, inneractiveAdRequest, content != 0 ? (com.fyber.inneractive.sdk.response.f) ((c0) content).b : null, (JSONArray) null).a((String) null);
} catch (Exception unused) {
}
}
n.this.f();
}
@Override // com.fyber.inneractive.sdk.web.f.b
public final void a(InneractiveInfrastructureError inneractiveInfrastructureError) {
n.this.b(inneractiveInfrastructureError);
n nVar = n.this;
nVar.getClass();
IAlog.a("%sweb view returned onFailedLoading!", IAlog.a(nVar));
n.this.a(inneractiveInfrastructureError);
if (inneractiveInfrastructureError.getErrorCode() == InneractiveErrorCode.NON_SECURE_CONTENT_DETECTED) {
com.fyber.inneractive.sdk.network.q qVar = com.fyber.inneractive.sdk.network.q.MRAID_ERROR_UNSECURE_CONTENT;
n nVar2 = n.this;
new s.a(qVar, nVar2.a, nVar2.b, (JSONArray) null).a((String) null);
}
}
}
}

View File

@@ -0,0 +1,247 @@
package com.fyber.inneractive.sdk.flow;
import android.text.TextUtils;
import android.webkit.WebView;
import com.fyber.inneractive.sdk.config.IAConfigManager;
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.external.InneractiveVideoError;
import com.fyber.inneractive.sdk.network.s;
import com.fyber.inneractive.sdk.player.a;
import com.fyber.inneractive.sdk.player.h;
import com.fyber.inneractive.sdk.util.IAlog;
import com.iab.omid.library.fyber.adsession.AdEvents;
import com.iab.omid.library.fyber.adsession.AdSession;
import com.iab.omid.library.fyber.adsession.AdSessionConfiguration;
import com.iab.omid.library.fyber.adsession.AdSessionContext;
import com.iab.omid.library.fyber.adsession.CreativeType;
import com.iab.omid.library.fyber.adsession.ImpressionType;
import com.iab.omid.library.fyber.adsession.Owner;
import com.iab.omid.library.fyber.adsession.media.MediaEvents;
import com.iab.omid.library.fyber.publisher.AdSessionStatePublisher;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
/* loaded from: classes2.dex */
public final class o extends h<com.fyber.inneractive.sdk.response.g, g0> implements h.b {
public com.fyber.inneractive.sdk.player.h m;
public String n;
public final a o = new a();
public class a implements com.fyber.inneractive.sdk.network.w<String> {
public a() {
}
@Override // com.fyber.inneractive.sdk.network.w
public final void a(String str, Exception exc, boolean z) {
com.fyber.inneractive.sdk.player.ui.remote.g gVar;
a.InterfaceC0079a interfaceC0079a;
String str2 = str;
IAlog.a("IAVideoContentLoader : Remote ui template callback onNetworkResult from cache: %s", Boolean.valueOf(z));
o oVar = o.this;
oVar.getClass();
if (TextUtils.isEmpty(str2) && z) {
String concat = "Fetched cached template is ".concat(str2 == null ? "null" : "empty");
HashMap hashMap = new HashMap();
hashMap.put("description", concat);
if (exc != null) {
hashMap.put("exception", exc.getMessage());
}
com.fyber.inneractive.sdk.player.ui.remote.e.a(com.fyber.inneractive.sdk.web.remoteui.a.TEMPLATE_CONTENT_ERROR, oVar.n, oVar.a, oVar.b, hashMap);
return;
}
com.fyber.inneractive.sdk.player.h hVar = oVar.m;
if (hVar == null || (interfaceC0079a = hVar.f) == null || (gVar = ((com.fyber.inneractive.sdk.player.e) interfaceC0079a).B) == null) {
gVar = null;
}
if (gVar == null) {
HashMap hashMap2 = new HashMap();
hashMap2.put("description", "Flow Manager is null");
com.fyber.inneractive.sdk.player.ui.remote.e.a(com.fyber.inneractive.sdk.web.remoteui.a.TEMPLATE_CONTENT_ERROR, oVar.n, oVar.a, oVar.b, hashMap2);
return;
}
if (!TextUtils.isEmpty(str2)) {
com.fyber.inneractive.sdk.player.ui.remote.b bVar = gVar.a;
bVar.getClass();
IAlog.a("%s : schedule UI load timeout task with delay: %d", "RemoteUIWebviewController", 10000);
com.fyber.inneractive.sdk.util.p.b.postDelayed(bVar.j, 10000);
bVar.b.loadData(str2, "text/html", "UTF-8");
return;
}
StringBuilder sb = new StringBuilder("Unknown error while receiving template: templateContent is: ");
sb.append(TextUtils.isEmpty(str2) ? "null or empty" : "not null and not empty");
sb.append(" isFromCache: ");
sb.append(z);
String sb2 = sb.toString();
HashMap hashMap3 = new HashMap();
hashMap3.put("description", sb2);
if (exc != null) {
hashMap3.put("exception", exc.getMessage());
}
com.fyber.inneractive.sdk.player.ui.remote.e.a(com.fyber.inneractive.sdk.web.remoteui.a.TEMPLATE_CONTENT_ERROR, oVar.n, oVar.a, oVar.b, hashMap3);
}
}
@Override // com.fyber.inneractive.sdk.flow.h
public final String d() {
return "send_failed_vast_creatives";
}
@Override // com.fyber.inneractive.sdk.flow.h
public final void g() {
com.fyber.inneractive.sdk.model.vast.b bVar;
AdSessionConfiguration adSessionConfiguration;
com.fyber.inneractive.sdk.network.q qVar;
com.fyber.inneractive.sdk.model.vast.b bVar2;
IAlog.a(IAlog.a(this) + "start called", new Object[0]);
com.fyber.inneractive.sdk.config.f0 e = e();
Response response = this.b;
AdSessionContext adSessionContext = null;
com.fyber.inneractive.sdk.model.vast.b bVar3 = response == 0 ? null : ((com.fyber.inneractive.sdk.response.g) response).L;
if (bVar3 != null && bVar3.d.size() < bVar3.j) {
bVar3.d.clear();
bVar3.g.clear();
bVar3.d.addAll(bVar3.l);
bVar3.g.addAll(bVar3.m);
}
g0 g0Var = new g0(e, this.g, (com.fyber.inneractive.sdk.response.g) this.b, this.a);
this.c = g0Var;
com.fyber.inneractive.sdk.response.g gVar = (com.fyber.inneractive.sdk.response.g) this.b;
InneractiveAdRequest inneractiveAdRequest = this.a;
com.fyber.inneractive.sdk.player.h hVar = new com.fyber.inneractive.sdk.player.h(gVar, inneractiveAdRequest, g0Var, this);
this.m = hVar;
g0 g0Var2 = (g0) this.c;
g0Var2.i = hVar;
g0Var2.f = this.h;
this.n = bVar3 != null ? bVar3.o : null;
hVar.e = null;
if (gVar != null && (bVar2 = gVar.L) != null) {
hVar.e = bVar2.d.poll();
}
if (hVar.e == null) {
InneractiveVideoError.Error playerError = new InneractiveVideoError(InneractiveVideoError.Error.ERROR_FAILED_PLAYING_ALL_MEDIA_FILES).getPlayerError();
int i = h.a.a[playerError.ordinal()];
if (i == 1) {
qVar = com.fyber.inneractive.sdk.network.q.VAST_ERROR_NO_MEDIA_FILES;
} else if (i == 2) {
qVar = com.fyber.inneractive.sdk.network.q.VAST_ERROR_FAILED_PLAYING_MEDIA_FILE;
} else if (i == 3) {
qVar = com.fyber.inneractive.sdk.network.q.VAST_ERROR_FAILED_PLAYING_ALL_MEDIA_FILES;
} else if (i == 4) {
qVar = com.fyber.inneractive.sdk.network.q.VAST_ERROR_PRE_BUFFER_TIMEOUT;
} else if (i != 5) {
IAlog.a("IAReportError, Does not know player error " + playerError.getErrorString(), new Object[0]);
qVar = com.fyber.inneractive.sdk.network.q.VAST_UNKNOWN_PLAYER_ERROR;
} else {
qVar = com.fyber.inneractive.sdk.network.q.VAST_ERROR_BUFFER_TIMEOUT;
}
new s.a(qVar, inneractiveAdRequest, gVar, hVar.h.c()).a((String) null);
InneractiveInfrastructureError inneractiveInfrastructureError = new InneractiveInfrastructureError(InneractiveErrorCode.SDK_INTERNAL_ERROR, g.VAST_NO_MEDIA_FILES);
b(inneractiveInfrastructureError);
a(inneractiveInfrastructureError);
} else {
try {
hVar.f = hVar.a.a();
} catch (Throwable th) {
h.b bVar4 = hVar.d;
InneractiveInfrastructureError inneractiveInfrastructureError2 = new InneractiveInfrastructureError(InneractiveErrorCode.SDK_INTERNAL_ERROR, g.COULD_NOT_CREATE_FLOW_MANAGER, th);
o oVar = (o) bVar4;
oVar.b(inneractiveInfrastructureError2);
oVar.a(inneractiveInfrastructureError2);
}
a.InterfaceC0079a interfaceC0079a = hVar.f;
if (interfaceC0079a != null) {
com.fyber.inneractive.sdk.player.e eVar = (com.fyber.inneractive.sdk.player.e) interfaceC0079a;
if (eVar.g != null) {
com.fyber.inneractive.sdk.measurement.d dVar = new com.fyber.inneractive.sdk.measurement.d();
com.fyber.inneractive.sdk.measurement.a aVar = eVar.g;
ArrayList arrayList = eVar.v.e;
g0 g0Var3 = eVar.e;
try {
try {
CreativeType creativeType = CreativeType.VIDEO;
ImpressionType impressionType = ImpressionType.UNSPECIFIED;
Owner owner = Owner.NATIVE;
adSessionConfiguration = AdSessionConfiguration.createAdSessionConfiguration(creativeType, impressionType, owner, owner, false);
} catch (Throwable th2) {
dVar.a(th2);
}
} catch (Throwable th3) {
dVar.a(th3);
adSessionConfiguration = null;
}
ArrayList a2 = dVar.a(arrayList);
if (((com.fyber.inneractive.sdk.measurement.b) aVar).e != null && ((com.fyber.inneractive.sdk.measurement.b) aVar).b != null) {
try {
adSessionContext = AdSessionContext.createNativeAdSessionContext(((com.fyber.inneractive.sdk.measurement.b) aVar).e, ((com.fyber.inneractive.sdk.measurement.b) aVar).b, a2, "", "");
} catch (Throwable th4) {
dVar.a(th4);
}
}
AdSession createAdSession = AdSession.createAdSession(adSessionConfiguration, adSessionContext);
dVar.a = createAdSession;
AdSessionStatePublisher adSessionStatePublisher = createAdSession.getAdSessionStatePublisher();
if (adSessionStatePublisher != null) {
adSessionStatePublisher.getWebView();
WebView webView = adSessionStatePublisher.getWebView();
if (webView != null) {
webView.setWebViewClient(dVar.g);
}
}
dVar.b = AdEvents.createAdEvents(dVar.a);
dVar.c = MediaEvents.createMediaEvents(dVar.a);
dVar.a.start();
dVar.f = g0Var3;
eVar.h = dVar;
eVar.i = new com.fyber.inneractive.sdk.player.f(dVar);
}
if (eVar.h == null && (bVar = eVar.v) != null) {
Iterator it = bVar.e.iterator();
while (it.hasNext()) {
com.fyber.inneractive.sdk.measurement.f fVar = (com.fyber.inneractive.sdk.measurement.f) it.next();
com.fyber.inneractive.sdk.measurement.g gVar2 = com.fyber.inneractive.sdk.measurement.g.ERROR_DURING_RESOURCE_LOAD;
com.fyber.inneractive.sdk.model.vast.v vVar = com.fyber.inneractive.sdk.model.vast.v.EVENT_VERIFICATION_NOT_EXECUTED;
com.fyber.inneractive.sdk.player.e.a(new com.fyber.inneractive.sdk.measurement.e(fVar.a(vVar), gVar2), vVar);
}
}
}
hVar.c();
}
if (TextUtils.isEmpty(this.n)) {
return;
}
IAConfigManager.L.r.a(new com.fyber.inneractive.sdk.network.g0(this.o, com.fyber.inneractive.sdk.util.o.a, new com.fyber.inneractive.sdk.cache.j(this.n)));
}
@Override // com.fyber.inneractive.sdk.flow.h, com.fyber.inneractive.sdk.interfaces.a
public final void cancel() {
IAlog.a("%s: IAAdContentLoaderImpl : cancel load ad content retry task", IAlog.a(this));
com.fyber.inneractive.sdk.util.p.b.removeCallbacks(this.l);
this.k.a();
com.fyber.inneractive.sdk.player.h hVar = this.m;
if (hVar != null) {
hVar.a();
}
}
@Override // com.fyber.inneractive.sdk.flow.h, com.fyber.inneractive.sdk.interfaces.a.b
public final void b() {
InneractiveVideoError inneractiveVideoError;
com.fyber.inneractive.sdk.model.vast.b bVar;
if (this.m != null) {
Response response = this.b;
if (response == 0 || (bVar = ((com.fyber.inneractive.sdk.response.g) response).L) == null) {
inneractiveVideoError = null;
} else if (bVar.d.size() == 0) {
inneractiveVideoError = new InneractiveVideoError(InneractiveVideoError.Error.ERROR_FAILED_PLAYING_ALL_MEDIA_FILES, null);
} else {
inneractiveVideoError = new InneractiveVideoError(InneractiveVideoError.Error.ERROR_FAILED_PLAYING_MEDIA_FILE, null);
}
this.m.a(inneractiveVideoError, null, true);
}
cancel();
super.b();
}
}

View File

@@ -0,0 +1,182 @@
package com.fyber.inneractive.sdk.flow;
import android.text.TextUtils;
import com.fyber.inneractive.sdk.config.IAConfigManager;
import com.fyber.inneractive.sdk.external.InneractiveAdRequest;
import com.fyber.inneractive.sdk.network.s;
import com.fyber.inneractive.sdk.response.e;
import com.fyber.inneractive.sdk.util.IAlog;
import org.json.JSONObject;
/* loaded from: classes2.dex */
public abstract class p<T extends com.fyber.inneractive.sdk.response.e> extends q<T> {
public com.fyber.inneractive.sdk.web.u g;
public final a h;
public p(com.fyber.inneractive.sdk.config.f0 f0Var, com.fyber.inneractive.sdk.config.global.s sVar) {
super(f0Var, sVar);
this.h = new a();
}
@Override // com.fyber.inneractive.sdk.flow.q
public final void a(String str) {
com.fyber.inneractive.sdk.ignite.l lVar;
T t;
com.fyber.inneractive.sdk.ignite.l lVar2 = com.fyber.inneractive.sdk.ignite.l.NONE;
T t2 = this.b;
if (t2 != null) {
com.fyber.inneractive.sdk.ignite.l lVar3 = t2.F;
lVar3.getClass();
lVar = com.fyber.inneractive.sdk.ignite.l.SINGLE_TAP;
if (lVar3 != lVar) {
com.fyber.inneractive.sdk.ignite.l lVar4 = this.b.F;
lVar4.getClass();
if (lVar4 != com.fyber.inneractive.sdk.ignite.l.TRUE_SINGLE_TAP || isVideoAd()) {
lVar = this.b.F;
} else {
this.h.a(com.fyber.inneractive.sdk.network.q.IGNITE_FLOW_MODE_NOT_COMPATIBLE, null, null, null);
}
}
} else {
lVar = lVar2;
}
com.fyber.inneractive.sdk.ignite.c cVar = IAConfigManager.L.D;
if (!cVar.f || (t = this.b) == null || t.F == lVar2 || TextUtils.isEmpty(t.y) || TextUtils.isEmpty(t.E) || TextUtils.isEmpty(t.G) || !cVar.m()) {
T t3 = this.b;
if (t3 != null) {
t3.F = lVar2;
return;
}
return;
}
T t4 = this.b;
String str2 = t4 != null ? t4.y : null;
com.fyber.inneractive.sdk.web.z zVar = new com.fyber.inneractive.sdk.web.z();
zVar.a = str2;
zVar.b = lVar;
zVar.c = str;
zVar.d = this.c;
zVar.e = t4 != null ? t4.E : null;
zVar.f = t4 != null ? t4.G : null;
zVar.g = this.h;
com.fyber.inneractive.sdk.web.u uVar = new com.fyber.inneractive.sdk.web.u(zVar);
this.g = uVar;
com.fyber.inneractive.sdk.config.global.features.p pVar = (com.fyber.inneractive.sdk.config.global.features.p) this.c.a(com.fyber.inneractive.sdk.config.global.features.p.class);
if (pVar == null || str2 == null) {
return;
}
String a2 = pVar.a("detail_url", "https://cdn2.inner-active.mobi/app-detail-page-v0/[BUNDLE_ID].html");
uVar.e(a2 == null ? "" : a2.replace("[BUNDLE_ID]", str2));
}
@Override // com.fyber.inneractive.sdk.flow.q
public final com.fyber.inneractive.sdk.web.u c() {
return this.g;
}
@Override // com.fyber.inneractive.sdk.flow.q
public final void h() {
T t;
T t2;
com.fyber.inneractive.sdk.ignite.c cVar = IAConfigManager.L.D;
if (!cVar.f || (t = this.b) == null) {
return;
}
com.fyber.inneractive.sdk.ignite.l lVar = t.F;
com.fyber.inneractive.sdk.ignite.l lVar2 = com.fyber.inneractive.sdk.ignite.l.NONE;
if (lVar == lVar2 || TextUtils.isEmpty(t.y) || TextUtils.isEmpty(t.E) || TextUtils.isEmpty(t.G) || !cVar.m() || f() || (t2 = this.b) == null || t2.F == lVar2) {
return;
}
IAlog.a("ignite webpage was not loaded yet, stopping the loading process", new Object[0]);
T t3 = this.b;
if (lVar2 == null) {
t3.getClass();
}
t3.F = lVar2;
com.fyber.inneractive.sdk.web.u uVar = this.g;
if (uVar != null) {
com.fyber.inneractive.sdk.web.v vVar = uVar.p;
if (vVar != null) {
com.fyber.inneractive.sdk.util.p.b.removeCallbacks(vVar);
uVar.p = null;
}
if (!uVar.y) {
uVar.a.stopLoading();
}
this.h.a(com.fyber.inneractive.sdk.network.q.IGNITE_FLOW_FAILED_TO_LOAD_WEBPAGE, this.g.k, com.fyber.inneractive.sdk.ignite.h.WEBPAGE_NOT_LOADED_BEFORE_SHOW.e(), this.b.F);
}
}
@Override // com.fyber.inneractive.sdk.flow.q
public final boolean f() {
com.fyber.inneractive.sdk.web.u uVar = this.g;
return uVar != null && uVar.l;
}
public class a implements com.fyber.inneractive.sdk.ignite.i {
public a() {
}
public final void a(com.fyber.inneractive.sdk.network.r rVar, com.fyber.inneractive.sdk.ignite.l lVar) {
p pVar = p.this;
InneractiveAdRequest inneractiveAdRequest = pVar.a;
T t = pVar.b;
com.fyber.inneractive.sdk.config.global.s sVar = pVar.c;
s.a aVar = new s.a(rVar, inneractiveAdRequest, t, sVar != null ? sVar.c() : null);
JSONObject jSONObject = new JSONObject();
String e = lVar.e();
try {
jSONObject.put("ignitem", e);
} catch (Exception unused) {
IAlog.f("Got exception adding param to json object: %s, %s", "ignitem", e);
}
aVar.f.put(jSONObject);
aVar.a((String) null);
}
public final void a(com.fyber.inneractive.sdk.network.q qVar, String str, String str2, com.fyber.inneractive.sdk.ignite.l lVar) {
p pVar = p.this;
InneractiveAdRequest inneractiveAdRequest = pVar.a;
T t = pVar.b;
com.fyber.inneractive.sdk.config.global.s sVar = pVar.c;
s.a aVar = new s.a(qVar, inneractiveAdRequest, t, sVar != null ? sVar.c() : null);
JSONObject jSONObject = new JSONObject();
if (lVar != null) {
String e = lVar.e();
try {
jSONObject.put("ignitem", e);
} catch (Exception unused) {
IAlog.f("Got exception adding param to json object: %s, %s", "ignitem", e);
}
}
if (!TextUtils.isEmpty(str)) {
try {
jSONObject.put("message", str);
} catch (Exception unused2) {
IAlog.f("Got exception adding param to json object: %s, %s", "message", str);
}
}
if (!TextUtils.isEmpty(str2)) {
try {
jSONObject.put("error_code", str2);
} catch (Exception unused3) {
IAlog.f("Got exception adding param to json object: %s, %s", "error_code", str2);
}
}
aVar.f.put(jSONObject);
aVar.a((String) null);
}
}
@Override // com.fyber.inneractive.sdk.flow.q
public final boolean a(boolean z, com.fyber.inneractive.sdk.util.h hVar) {
com.fyber.inneractive.sdk.ignite.l lVar;
T t = this.b;
if (t != null) {
lVar = t.F;
} else {
lVar = com.fyber.inneractive.sdk.ignite.l.NONE;
}
return !z && lVar != null && lVar == com.fyber.inneractive.sdk.ignite.l.TRUE_SINGLE_TAP && (hVar == com.fyber.inneractive.sdk.util.h.VIDEO_CTA || hVar == com.fyber.inneractive.sdk.util.h.DEFAULT_ENDCARD);
}
}

View File

@@ -0,0 +1,64 @@
package com.fyber.inneractive.sdk.flow;
import com.fyber.inneractive.sdk.external.InneractiveAdRequest;
import com.fyber.inneractive.sdk.response.e;
/* loaded from: classes2.dex */
public abstract class q<T extends com.fyber.inneractive.sdk.response.e> {
public InneractiveAdRequest a;
public T b;
public final com.fyber.inneractive.sdk.config.global.s c;
public final com.fyber.inneractive.sdk.config.f0 d;
public boolean e = false;
public boolean f = false;
public q(com.fyber.inneractive.sdk.config.f0 f0Var, com.fyber.inneractive.sdk.config.global.s sVar) {
this.d = f0Var;
this.c = sVar;
}
public abstract void a();
public final void a(InneractiveAdRequest inneractiveAdRequest) {
this.a = inneractiveAdRequest;
}
public final void a(T t) {
this.b = t;
}
public void a(String str) {
}
public boolean a(boolean z, com.fyber.inneractive.sdk.util.h hVar) {
return false;
}
public final com.fyber.inneractive.sdk.config.global.s b() {
return this.c;
}
public com.fyber.inneractive.sdk.web.u c() {
return null;
}
public T d() {
return this.b;
}
public boolean e() {
com.fyber.inneractive.sdk.config.c0 c0Var = ((com.fyber.inneractive.sdk.config.e0) this.d).e;
return false;
}
public boolean f() {
return false;
}
public abstract boolean g();
public void h() {
}
public abstract boolean isVideoAd();
}

View File

@@ -0,0 +1,385 @@
package com.fyber.inneractive.sdk.flow;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import com.fyber.inneractive.sdk.R;
import com.fyber.inneractive.sdk.activities.InneractiveInternalBrowserActivity;
import com.fyber.inneractive.sdk.click.f;
import com.fyber.inneractive.sdk.click.l;
import com.fyber.inneractive.sdk.config.IAConfigManager;
import com.fyber.inneractive.sdk.config.enums.UnitDisplayType;
import com.fyber.inneractive.sdk.external.ImpressionData;
import com.fyber.inneractive.sdk.external.InneractiveAdRenderer;
import com.fyber.inneractive.sdk.external.InneractiveAdRequest;
import com.fyber.inneractive.sdk.external.InneractiveAdSpot;
import com.fyber.inneractive.sdk.external.InneractiveAdViewEventsListenerWithImpressionData;
import com.fyber.inneractive.sdk.external.InneractiveFullscreenAdEventsListenerWithImpressionData;
import com.fyber.inneractive.sdk.external.InneractiveUnitController;
import com.fyber.inneractive.sdk.external.InneractiveUnitController.EventsListener;
import com.fyber.inneractive.sdk.external.OnGlobalImpressionDataListener;
import com.fyber.inneractive.sdk.external.WebViewRendererProcessHasGoneError;
import com.fyber.inneractive.sdk.flow.q;
import com.fyber.inneractive.sdk.network.j0;
import com.fyber.inneractive.sdk.network.q0;
import com.fyber.inneractive.sdk.network.s;
import com.fyber.inneractive.sdk.util.IAlog;
import com.fyber.inneractive.sdk.util.p0;
import com.fyber.inneractive.sdk.web.u;
import java.util.ArrayList;
import org.json.JSONArray;
/* loaded from: classes2.dex */
public abstract class r<AdContent extends q, EventsListener extends InneractiveUnitController.EventsListener> implements InneractiveAdRenderer, InneractiveInternalBrowserActivity.InternalBrowserListener, f.a, u.d {
public InneractiveAdSpot a;
public AdContent b;
public EventsListener c;
public boolean d = false;
public boolean e = false;
public boolean f = true;
public Runnable g;
public com.fyber.inneractive.sdk.click.l h;
public a i;
public View j;
public class a implements l.b {
public final /* synthetic */ p0 a;
public final /* synthetic */ com.fyber.inneractive.sdk.util.h b;
public a(p0 p0Var, com.fyber.inneractive.sdk.util.h hVar) {
this.a = p0Var;
this.b = hVar;
}
@Override // com.fyber.inneractive.sdk.click.l.b
public final void a(com.fyber.inneractive.sdk.click.b bVar) {
r rVar = r.this;
rVar.getClass();
IAlog.a("%s super click result: %s", IAlog.a(rVar), bVar);
r rVar2 = r.this;
if (rVar2.h == null) {
IAlog.a("%s click handler is null. Probably cancelled", IAlog.a(rVar2));
return;
}
rVar2.h = null;
rVar2.i = null;
rVar2.F();
if (bVar != null) {
r rVar3 = r.this;
p0 p0Var = this.a;
com.fyber.inneractive.sdk.util.h hVar = this.b;
rVar3.getClass();
l.d dVar = bVar.a;
if (dVar == l.d.OPEN_IN_EXTERNAL_APPLICATION || dVar == l.d.OPEN_GOOGLE_STORE) {
IAlog.a("InneractiveAdRendererImpl: handleOpenResult - opened in external application", new Object[0]);
ArrayList arrayList = bVar.f;
com.fyber.inneractive.sdk.click.i iVar = (com.fyber.inneractive.sdk.click.i) arrayList.get(arrayList.size() - 1);
l.d dVar2 = iVar.c;
if (dVar2 == l.d.OPENED_IN_EXTERNAL_BROWSER) {
rVar3.a(iVar.a, dVar2);
}
if (rVar3.c != null) {
rVar3.E();
}
} else if (dVar == l.d.OPENED_IN_INTERNAL_BROWSER) {
IAlog.a("InneractiveAdRendererImpl: handleOpenResult - opened in internal browser", new Object[0]);
rVar3.d = true;
InneractiveInternalBrowserActivity.setInternalBrowserListener(rVar3);
} else if (dVar == l.d.OPENED_USING_CHROME_NAVIGATE || dVar == l.d.OPENED_IN_EXTERNAL_BROWSER) {
IAlog.a("InneractiveAdRendererImpl: handleOpenResult - opened in external browser", new Object[0]);
rVar3.a(bVar.d, bVar.a);
if (rVar3.c != null) {
rVar3.E();
}
}
if (rVar3.j() == com.fyber.inneractive.sdk.ignite.l.NONE || !(TextUtils.isEmpty(bVar.c) || bVar.c.equals("IgniteGooglePlay"))) {
rVar3.b(bVar, p0Var, hVar);
}
}
}
}
public int A() {
return -1;
}
public boolean B() {
return false;
}
public void F() {
View y = y();
if (y == null || this.j == null || y.getParent() == null || !(y.getParent() instanceof ViewGroup)) {
return;
}
y.getLayoutParams();
((ViewGroup) y.getParent()).removeView(this.j);
c(this.j);
this.j = null;
}
public final void G() {
AdContent adcontent = this.b;
if (adcontent == null || adcontent.d() == null) {
return;
}
String str = this.b.d().o;
if (TextUtils.isEmpty(str)) {
return;
}
IAlog.e("%sfiring rewarded completion!", IAlog.a(this));
j0.b(str);
}
public void b(View view) {
}
public final void b(com.fyber.inneractive.sdk.response.e eVar) {
String str = eVar.k;
if (str == null || str.trim().length() <= 0) {
return;
}
IAlog.e("%sfiring impression!", IAlog.a(this));
j0.b(str);
}
public void c(View view) {
}
@Override // com.fyber.inneractive.sdk.external.InneractiveAdRenderer
public boolean canRefreshAd() {
return true;
}
public final com.fyber.inneractive.sdk.ignite.l j() {
AdContent adcontent = this.b;
return (adcontent == null || !adcontent.f() || this.b.d() == null) ? com.fyber.inneractive.sdk.ignite.l.NONE : this.b.d().F;
}
@Override // com.fyber.inneractive.sdk.activities.InneractiveInternalBrowserActivity.InternalBrowserListener
public final void onApplicationInBackground() {
E();
}
@Override // com.fyber.inneractive.sdk.activities.InneractiveInternalBrowserActivity.InternalBrowserListener
public final void onInternalBrowserDismissed() {
IAlog.a("onInternalBrowserDismissed callback called", new Object[0]);
if (this.d) {
this.d = false;
InneractiveInternalBrowserActivity.setInternalBrowserListener(null);
}
if (this.c != null) {
IAlog.a("%sCalling external interface onAdWillCloseInternalBrowser", IAlog.a(this));
this.c.onAdWillCloseInternalBrowser(this.a);
}
}
public void x() {
View y = y();
if (y == null || y.getParent() == null || !(y.getParent() instanceof ViewGroup) || this.j != null) {
return;
}
View inflate = View.inflate(y.getContext(), R.layout.ia_layout_click_overlay, null);
this.j = inflate;
if (inflate != null) {
((ViewGroup) y.getParent()).addView(this.j, y.getLayoutParams());
b(this.j);
}
}
public abstract View y();
public int z() {
return -1;
}
@Override // com.fyber.inneractive.sdk.external.InneractiveAdRenderer
public void destroy() {
if (this.d) {
InneractiveInternalBrowserActivity.setInternalBrowserListener(null);
this.d = false;
}
Runnable runnable = this.g;
if (runnable != null) {
com.fyber.inneractive.sdk.util.p.b.removeCallbacks(runnable);
this.g = null;
}
this.b = null;
this.c = null;
this.a = null;
if (this.h != null) {
F();
q0 q0Var = this.h.g;
if (q0Var != null) {
q0Var.a = true;
}
this.h = null;
this.i = null;
}
}
public void C() {
com.fyber.inneractive.sdk.response.e d;
if (this.c != null) {
IAlog.a("%sCalling external interface onAdClicked", IAlog.a(this));
this.c.onAdClicked(this.a);
}
AdContent adcontent = this.b;
if (adcontent == null || (d = adcontent.d()) == null) {
return;
}
IAConfigManager.L.w.a(d.n, "LAST_CLICKED", "1");
}
public final void D() {
com.fyber.inneractive.sdk.response.e d;
if (this.e || this.c == null) {
return;
}
IAlog.a("%sCalling external interface onAdImpression", IAlog.a(this));
this.c.onAdImpression(this.a);
AdContent adcontent = this.b;
if (adcontent != null && (d = adcontent.d()) != null) {
IAConfigManager iAConfigManager = IAConfigManager.L;
com.fyber.inneractive.sdk.config.i0 i0Var = iAConfigManager.w;
if (i0Var != null) {
UnitDisplayType unitDisplayType = d.n;
ImpressionData impressionData = d.r;
i0Var.a(unitDisplayType, "LAST_DOMAIN_SHOWED", impressionData != null ? impressionData.getAdvertiserDomain() : null);
i0Var.a(unitDisplayType, "LAST_APP_BUNDLE_ID", d.y);
if (this.b.isVideoAd()) {
i0Var.a(unitDisplayType, "LAST_VAST_SKIPED", "0");
i0Var.a(unitDisplayType, "LAST_VAST_CLICKED_TYPE", "0");
}
i0Var.a(unitDisplayType, "LAST_CLICKED", "0");
}
com.fyber.inneractive.sdk.util.j0 j0Var = iAConfigManager.z;
com.fyber.inneractive.sdk.config.f0 f0Var = this.b.d;
ImpressionData impressionData2 = d.r;
if (f0Var != null) {
OnGlobalImpressionDataListener onGlobalImpressionDataListener = j0Var.a;
if (onGlobalImpressionDataListener != null) {
com.fyber.inneractive.sdk.config.e0 e0Var = (com.fyber.inneractive.sdk.config.e0) f0Var;
onGlobalImpressionDataListener.onImpression(e0Var.b, e0Var.a, impressionData2);
}
} else {
j0Var.getClass();
}
EventsListener eventslistener = this.c;
if (eventslistener instanceof InneractiveFullscreenAdEventsListenerWithImpressionData) {
((InneractiveFullscreenAdEventsListenerWithImpressionData) eventslistener).onAdImpression(this.a, d.r);
} else if (eventslistener instanceof InneractiveAdViewEventsListenerWithImpressionData) {
((InneractiveAdViewEventsListenerWithImpressionData) eventslistener).onAdImpression(this.a, d.r);
}
}
this.e = true;
}
public final void E() {
if (this.c != null) {
IAlog.a("%sCalling external interface onAdWillOpenExternalApp", IAlog.a(this));
this.c.onAdWillOpenExternalApp(this.a);
}
}
/* JADX WARN: Removed duplicated region for block: B:43:0x00cc */
/* JADX WARN: Removed duplicated region for block: B:46:0x00dd */
/* JADX WARN: Removed duplicated region for block: B:50:0x00f3 */
/* JADX WARN: Removed duplicated region for block: B:59:0x010e */
/* JADX WARN: Removed duplicated region for block: B:62:0x014f */
/* JADX WARN: Removed duplicated region for block: B:64:0x0158 */
/* JADX WARN: Removed duplicated region for block: B:67:0x015e */
/* JADX WARN: Removed duplicated region for block: B:72:0x016d */
/* JADX WARN: Removed duplicated region for block: B:77:0x0180 */
/* JADX WARN: Removed duplicated region for block: B:85:0x0155 */
/* JADX WARN: Removed duplicated region for block: B:86:0x00e0 */
/* JADX WARN: Removed duplicated region for block: B:89:0x00d5 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final com.fyber.inneractive.sdk.util.a0.a a(android.content.Context r14, java.lang.String r15, com.fyber.inneractive.sdk.util.p0 r16, com.fyber.inneractive.sdk.util.h r17) {
/*
Method dump skipped, instructions count: 455
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.flow.r.a(android.content.Context, java.lang.String, com.fyber.inneractive.sdk.util.p0, com.fyber.inneractive.sdk.util.h):com.fyber.inneractive.sdk.util.a0$a");
}
@Override // com.fyber.inneractive.sdk.external.InneractiveAdRenderer
public void initialize(InneractiveAdSpot inneractiveAdSpot) {
this.a = inneractiveAdSpot;
this.b = (AdContent) inneractiveAdSpot.getAdContent();
this.c = (EventsListener) inneractiveAdSpot.getSelectedUnitController().getEventsListener();
}
/* JADX WARN: Code restructure failed: missing block: B:92:0x01b2, code lost:
if (r10.a(true, "show_cta") != false) goto L103;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void b(com.fyber.inneractive.sdk.click.b r9, com.fyber.inneractive.sdk.util.p0 r10, com.fyber.inneractive.sdk.util.h r11) {
/*
Method dump skipped, instructions count: 456
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.flow.r.b(com.fyber.inneractive.sdk.click.b, com.fyber.inneractive.sdk.util.p0, com.fyber.inneractive.sdk.util.h):void");
}
public static void a(com.fyber.inneractive.sdk.response.e eVar) {
String str = eVar.l;
if (str == null || str.trim().length() <= 0) {
return;
}
j0.b(str);
}
@Override // com.fyber.inneractive.sdk.click.f.a
public final void a(com.fyber.inneractive.sdk.click.b bVar, p0 p0Var, com.fyber.inneractive.sdk.util.h hVar) {
b(bVar, p0Var, hVar);
}
public final void a(String str, l.d dVar) {
com.fyber.inneractive.sdk.response.e eVar;
JSONArray jSONArray;
InneractiveAdRequest inneractiveAdRequest;
AdContent adcontent = this.b;
if (adcontent != null) {
eVar = adcontent.d();
AdContent adcontent2 = this.b;
inneractiveAdRequest = adcontent2.a;
com.fyber.inneractive.sdk.config.global.s sVar = adcontent2.c;
jSONArray = sVar != null ? sVar.c() : null;
} else {
eVar = null;
jSONArray = null;
inneractiveAdRequest = null;
}
s.a a2 = new s.a(com.fyber.inneractive.sdk.network.r.EXTERNAL_BROWSER_OPENED, inneractiveAdRequest, eVar, jSONArray).a("url", str);
Object[] objArr = new Object[2];
objArr[0] = "fallback";
objArr[1] = (dVar == l.d.OPENED_USING_CHROME_NAVIGATE || dVar == l.d.OPENED_IN_EXTERNAL_BROWSER) ? "chrome" : "na";
a2.a(objArr).a((String) null);
}
public final void a(WebViewRendererProcessHasGoneError webViewRendererProcessHasGoneError) {
String simpleName = webViewRendererProcessHasGoneError.getClass().getSimpleName();
String message = webViewRendererProcessHasGoneError.getMessage();
AdContent adcontent = this.b;
com.fyber.inneractive.sdk.network.t.a(simpleName, message, adcontent != null ? adcontent.a : null, adcontent != null ? adcontent.d() : null);
if (this.c != null) {
IAlog.a("%sCalling external interface onAdEnteredErrorState: %s", IAlog.a(this), webViewRendererProcessHasGoneError.getMessage());
this.c.onAdEnteredErrorState(this.a, webViewRendererProcessHasGoneError);
}
}
public static void a(com.fyber.inneractive.sdk.cache.session.enums.a aVar, com.fyber.inneractive.sdk.cache.session.enums.b bVar) {
com.fyber.inneractive.sdk.cache.session.d dVar = IAConfigManager.L.w.a;
if (dVar != null) {
com.fyber.inneractive.sdk.util.p.a(new com.fyber.inneractive.sdk.cache.session.c(dVar, aVar, bVar));
}
}
}

View File

@@ -0,0 +1,22 @@
package com.fyber.inneractive.sdk.flow;
import com.fyber.inneractive.sdk.util.IAlog;
/* loaded from: classes2.dex */
public final class s implements Runnable {
public final /* synthetic */ r a;
public s(r rVar) {
this.a = rVar;
}
@Override // java.lang.Runnable
public final void run() {
r rVar = this.a;
rVar.getClass();
IAlog.a("%sRe-enabling clicks, grace period has passed", IAlog.a(rVar));
r rVar2 = this.a;
rVar2.f = true;
rVar2.g = null;
}
}

View File

@@ -0,0 +1,658 @@
package com.fyber.inneractive.sdk.flow;
import android.os.Looper;
import android.text.TextUtils;
import com.fyber.inneractive.sdk.bidder.adm.AdmParametersOuterClass$AdmParameters;
import com.fyber.inneractive.sdk.bidder.adm.f;
import com.fyber.inneractive.sdk.config.IAConfigManager;
import com.fyber.inneractive.sdk.external.InneractiveAdManager;
import com.fyber.inneractive.sdk.external.InneractiveAdRequest;
import com.fyber.inneractive.sdk.external.InneractiveAdSpot;
import com.fyber.inneractive.sdk.external.InneractiveAdSpotManager;
import com.fyber.inneractive.sdk.external.InneractiveErrorCode;
import com.fyber.inneractive.sdk.external.InneractiveFullscreenUnitController;
import com.fyber.inneractive.sdk.external.InneractiveInfrastructureError;
import com.fyber.inneractive.sdk.external.InneractiveMediationName;
import com.fyber.inneractive.sdk.external.InneractiveUnitController;
import com.fyber.inneractive.sdk.flow.k;
import com.fyber.inneractive.sdk.network.s;
import com.fyber.inneractive.sdk.network.t0;
import com.fyber.inneractive.sdk.util.IAlog;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
import org.json.JSONObject;
/* loaded from: classes2.dex */
public final class t implements w, d0 {
public final String a;
public InneractiveAdSpot.RequestListener b;
public InneractiveAdRequest c;
public u d;
public q e;
public f0 f;
public final HashSet g;
public j h;
public c i;
public boolean j = true;
public boolean k = false;
public l l;
public class a implements f.a {
public final /* synthetic */ com.fyber.inneractive.sdk.bidder.adm.f a;
public final /* synthetic */ com.fyber.inneractive.sdk.config.global.s b;
public final /* synthetic */ String c;
public a(com.fyber.inneractive.sdk.bidder.adm.f fVar, com.fyber.inneractive.sdk.config.global.s sVar, String str) {
this.a = fVar;
this.b = sVar;
this.c = str;
}
public final void a() {
com.fyber.inneractive.sdk.config.global.b bVar;
com.fyber.inneractive.sdk.config.global.k kVar;
com.fyber.inneractive.sdk.config.global.l lVar;
t tVar = t.this;
tVar.getClass();
IAlog.a("%s : InneractiveAdSpotImpl markup data available", IAlog.a(tVar));
AdmParametersOuterClass$AdmParameters admParametersOuterClass$AdmParameters = this.a.a;
if (admParametersOuterClass$AdmParameters != null) {
com.fyber.inneractive.sdk.config.global.s sVar = this.b;
List<AdmParametersOuterClass$AdmParameters.Experiment> abExperimentsList = admParametersOuterClass$AdmParameters.getAbExperimentsList();
sVar.getClass();
com.fyber.inneractive.sdk.config.global.a aVar = IAConfigManager.L.y;
aVar.getClass();
for (com.fyber.inneractive.sdk.config.global.features.g gVar : sVar.c.values()) {
if (gVar != null && (lVar = aVar.a) != null) {
com.fyber.inneractive.sdk.config.global.q qVar = (com.fyber.inneractive.sdk.config.global.q) lVar.a.get(gVar.b);
if (qVar != null) {
gVar.a = qVar.a;
}
}
}
if (abExperimentsList == null || abExperimentsList.size() <= 0) {
return;
}
com.fyber.inneractive.sdk.config.global.a aVar2 = IAConfigManager.L.y;
aVar2.b = sVar;
for (com.fyber.inneractive.sdk.config.global.features.g gVar2 : sVar.c.values()) {
for (AdmParametersOuterClass$AdmParameters.Experiment experiment : abExperimentsList) {
String identifier = experiment.getIdentifier();
String variant = experiment.getVariant();
com.fyber.inneractive.sdk.config.global.l lVar2 = aVar2.a;
if (lVar2 != null) {
com.fyber.inneractive.sdk.config.global.q qVar2 = (com.fyber.inneractive.sdk.config.global.q) lVar2.a.get(gVar2.b);
if (qVar2 != null && (bVar = (com.fyber.inneractive.sdk.config.global.b) qVar2.c.get(identifier)) != null) {
Iterator it = bVar.c.iterator();
while (true) {
if (it.hasNext()) {
kVar = (com.fyber.inneractive.sdk.config.global.k) it.next();
if (kVar.b.equals(variant)) {
break;
}
} else {
kVar = null;
break;
}
}
gVar2.c.put(bVar.a, bVar);
if (kVar != null) {
gVar2.d.put(bVar.a, kVar);
}
}
}
}
}
}
}
public final void a(Exception exc, InneractiveErrorCode inneractiveErrorCode, com.fyber.inneractive.sdk.response.e... eVarArr) {
com.fyber.inneractive.sdk.network.q qVar;
t tVar = t.this;
tVar.getClass();
IAlog.a("%s : InneractiveAdSpotImpl data error", IAlog.a(tVar));
com.fyber.inneractive.sdk.response.e eVar = eVarArr.length > 0 ? eVarArr[0] : null;
InneractiveInfrastructureError inneractiveInfrastructureError = new InneractiveInfrastructureError(inneractiveErrorCode, g.ADM_FETCH_FAILED);
u uVar = t.this.d;
if (uVar != null) {
uVar.a(null, inneractiveInfrastructureError, eVar);
}
l lVar = t.this.l;
if (lVar != null) {
IAlog.e("%sgot handleFailedLoading! with: %s", lVar.d(), inneractiveInfrastructureError);
k.a aVar = lVar.b;
if (aVar != null) {
((u) aVar).a(null, inneractiveInfrastructureError, eVar);
}
lVar.a(null, eVar);
}
t tVar2 = t.this;
String str = this.c;
com.fyber.inneractive.sdk.config.global.s sVar = this.b;
tVar2.getClass();
if (!inneractiveErrorCode.equals(InneractiveErrorCode.CONNECTION_ERROR) && !inneractiveErrorCode.equals(InneractiveErrorCode.NO_FILL)) {
qVar = com.fyber.inneractive.sdk.network.q.FATAL_ADM_PARSING_ERROR;
} else {
qVar = com.fyber.inneractive.sdk.network.q.FATAL_ADM_MARKUP_FETCHING_ERROR;
}
if (eVar != null) {
eVar.B = false;
}
String name = exc.getClass().getName();
if (exc instanceof t0) {
name = "NetworkStackException";
}
s.a aVar2 = new s.a(qVar, (InneractiveAdRequest) null, eVar, sVar.c());
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("exception", name);
} catch (Exception unused) {
IAlog.f("Got exception adding param to json object: %s, %s", "exception", name);
}
String localizedMessage = exc.getLocalizedMessage();
String str2 = exc;
if (localizedMessage != null) {
str2 = exc.getLocalizedMessage();
}
try {
jSONObject.put("message", str2);
} catch (Exception unused2) {
IAlog.f("Got exception adding param to json object: %s, %s", "message", str2);
}
try {
jSONObject.put("admPayload", str);
} catch (Exception unused3) {
IAlog.f("Got exception adding param to json object: %s, %s", "admPayload", str);
}
aVar2.f.put(jSONObject);
aVar2.a((String) null);
}
}
public class b implements Runnable {
public b() {
}
@Override // java.lang.Runnable
public final void run() {
t.this.b();
}
}
public interface c {
void onAdRefreshFailed(InneractiveAdSpot inneractiveAdSpot, InneractiveErrorCode inneractiveErrorCode);
void onAdRefreshed(InneractiveAdSpot inneractiveAdSpot);
}
public t() {
String uuid = UUID.randomUUID().toString();
this.a = uuid;
this.g = new HashSet();
IAlog.a("%sInneractiveAdSpotImpl created with UID: %s", c(), uuid);
}
@Override // com.fyber.inneractive.sdk.external.InneractiveAdSpot
public final void addUnitController(InneractiveUnitController inneractiveUnitController) {
if (inneractiveUnitController != null) {
f0 f0Var = (f0) inneractiveUnitController;
f0Var.setAdSpot(this);
if (this.g.size() > 0) {
Iterator it = new HashSet(this.g).iterator();
while (it.hasNext()) {
InneractiveUnitController inneractiveUnitController2 = (InneractiveUnitController) it.next();
if (inneractiveUnitController2.getClass().equals(inneractiveUnitController.getClass())) {
removeUnitController(inneractiveUnitController2);
}
}
}
this.g.add(f0Var);
if (this.e != null) {
Iterator it2 = this.g.iterator();
while (it2.hasNext()) {
f0 f0Var2 = (f0) it2.next();
if (f0Var2.supports(this)) {
this.f = f0Var2;
return;
}
}
}
}
}
public final void b() {
Iterator it = this.g.iterator();
while (it.hasNext()) {
((InneractiveUnitController) it.next()).destroy();
}
this.g.clear();
l lVar = this.l;
if (lVar != null) {
lVar.a(true);
lVar.b = null;
this.l = null;
}
j jVar = this.h;
if (jVar != null) {
jVar.b(true);
this.h = null;
}
this.b = null;
a();
InneractiveAdSpotManager.get().removeSpot(this);
}
public final String c() {
return IAlog.a(this);
}
@Override // com.fyber.inneractive.sdk.external.InneractiveAdSpot
public final q getAdContent() {
return this.e;
}
@Override // com.fyber.inneractive.sdk.external.InneractiveAdSpot
public final InneractiveAdRequest getCurrentProcessedRequest() {
return this.c;
}
@Override // com.fyber.inneractive.sdk.external.InneractiveAdSpot
public final String getLocalUniqueId() {
return this.a;
}
@Override // com.fyber.inneractive.sdk.external.InneractiveAdSpot
public final InneractiveMediationName getMediationName() {
return IAConfigManager.L.m;
}
@Override // com.fyber.inneractive.sdk.external.InneractiveAdSpot
public final String getMediationNameString() {
return IAConfigManager.L.l;
}
@Override // com.fyber.inneractive.sdk.external.InneractiveAdSpot
public final String getMediationVersion() {
return IAConfigManager.L.n;
}
@Override // com.fyber.inneractive.sdk.external.InneractiveAdSpot
public final String getRequestedSpotId() {
InneractiveAdRequest inneractiveAdRequest = this.c;
return inneractiveAdRequest != null ? inneractiveAdRequest.getSpotId() : "";
}
@Override // com.fyber.inneractive.sdk.external.InneractiveAdSpot
public final InneractiveUnitController getSelectedUnitController() {
return this.f;
}
@Override // com.fyber.inneractive.sdk.external.InneractiveAdSpot
public final void removeUnitController(InneractiveUnitController inneractiveUnitController) {
if (inneractiveUnitController != null) {
f0 f0Var = this.f;
if (f0Var != null && f0Var.equals(inneractiveUnitController)) {
this.f.destroy();
this.f = null;
}
this.g.remove(inneractiveUnitController);
}
}
@Override // com.fyber.inneractive.sdk.external.InneractiveAdSpot
public final void requestAd(InneractiveAdRequest inneractiveAdRequest) {
if (IAConfigManager.g()) {
IAlog.a("%sIAB TCF purpose 1 disabled, dropping request", IAlog.a(this));
InneractiveAdSpot.RequestListener requestListener = this.b;
if (requestListener != null) {
requestListener.onInneractiveFailedAdRequest(this, InneractiveErrorCode.IAB_TCF_PURPOSE_1_DISABLED);
return;
}
return;
}
IAlog.a("%srequestAd called with request: %s", IAlog.a(this), inneractiveAdRequest);
if (inneractiveAdRequest == null && this.c == null) {
IAlog.b("%srequestAd called with a null request, but no previous request is available! Cannot continue", IAlog.a(this));
InneractiveAdSpot.RequestListener requestListener2 = this.b;
if (requestListener2 != null) {
requestListener2.onInneractiveFailedAdRequest(this, InneractiveErrorCode.INVALID_INPUT);
return;
}
return;
}
if (!InneractiveAdManager.wasInitialized()) {
InneractiveAdSpot.RequestListener requestListener3 = this.b;
if (requestListener3 != null) {
requestListener3.onInneractiveFailedAdRequest(this, InneractiveErrorCode.SDK_NOT_INITIALIZED);
return;
}
return;
}
InneractiveAdRequest inneractiveAdRequest2 = inneractiveAdRequest != null ? inneractiveAdRequest : this.c;
String str = this.a;
inneractiveAdRequest2.b = str;
com.fyber.inneractive.sdk.metrics.d.d.a(str).g();
if (this.g.isEmpty()) {
IAlog.b("%srequestAd called but no AdUnitControllers exist! Cannot continue", IAlog.a(this));
if (this.b != null) {
if (inneractiveAdRequest == null) {
inneractiveAdRequest = this.c;
}
a(inneractiveAdRequest, null);
this.b.onInneractiveFailedAdRequest(this, InneractiveErrorCode.INVALID_INPUT);
return;
}
return;
}
j jVar = this.h;
if (jVar != null) {
jVar.b(inneractiveAdRequest != null || this.c == null);
}
if (inneractiveAdRequest != null) {
InneractiveAdRequest inneractiveAdRequest3 = this.c;
if (inneractiveAdRequest3 != null) {
inneractiveAdRequest.setSelectedUnitConfig(inneractiveAdRequest3.getSelectedUnitConfig());
}
this.c = inneractiveAdRequest;
q qVar = this.e;
if (qVar != null) {
qVar.a();
this.j = true;
}
Iterator it = this.g.iterator();
while (true) {
if (!it.hasNext()) {
this.c.a = false;
break;
} else if (((f0) it.next()) instanceof InneractiveFullscreenUnitController) {
break;
}
}
}
this.h = new j(this.a);
if (this.d == null) {
this.d = new u(this);
}
IAlog.a("%sFound ad source for request! %s", IAlog.a(this), this.h);
IAConfigManager iAConfigManager = IAConfigManager.L;
com.fyber.inneractive.sdk.measurement.a aVar = iAConfigManager.I;
if (aVar == null || !aVar.a) {
IAlog.a("%sinitOmidSdk", IAlog.a(this));
com.fyber.inneractive.sdk.util.p.a.execute(new com.fyber.inneractive.sdk.config.r(iAConfigManager, com.fyber.inneractive.sdk.util.o.a));
}
j jVar2 = this.h;
if (jVar2 != null) {
InneractiveAdRequest inneractiveAdRequest4 = this.c;
jVar2.b = this.d;
if (IAConfigManager.h()) {
jVar2.c(inneractiveAdRequest4);
return;
}
i iVar = new i(jVar2, inneractiveAdRequest4);
jVar2.g = iVar;
IAConfigManager.addListener(iVar);
IAConfigManager.a();
}
}
@Override // com.fyber.inneractive.sdk.external.InneractiveAdSpot
public final void setMediationName(InneractiveMediationName inneractiveMediationName) {
InneractiveAdManager.setMediationName(inneractiveMediationName);
}
@Override // com.fyber.inneractive.sdk.external.InneractiveAdSpot
public final void setMediationVersion(String str) {
InneractiveAdManager.setMediationVersion(str);
}
@Override // com.fyber.inneractive.sdk.flow.d0
public final void a(c cVar) {
this.i = cVar;
requestAd(null);
}
@Override // com.fyber.inneractive.sdk.external.InneractiveAdSpot
public final void destroy() {
IAlog.a("%sInneractiveAdSpotImpl spot destroy: %s", IAlog.a(this), this.a);
if (Looper.myLooper() == null || Looper.getMainLooper() != Looper.myLooper()) {
com.fyber.inneractive.sdk.util.p.b.post(new b());
} else {
b();
}
}
@Override // com.fyber.inneractive.sdk.external.InneractiveAdSpot
public final void loadAd(String str) {
IAlog.a("%s : InneractiveAdSpotImpl Start load ad process", IAlog.a(this));
if (IAConfigManager.g()) {
IAlog.a("%sIAB TCF purpose 1 disabled, dropping request", IAlog.a(this));
InneractiveAdSpot.RequestListener requestListener = this.b;
if (requestListener != null) {
requestListener.onInneractiveFailedAdRequest(this, InneractiveErrorCode.IAB_TCF_PURPOSE_1_DISABLED);
return;
}
return;
}
if (str == null || TextUtils.isEmpty(str)) {
InneractiveAdSpot.RequestListener requestListener2 = this.b;
if (requestListener2 != null) {
requestListener2.onInneractiveFailedAdRequest(this, InneractiveErrorCode.INVALID_INPUT);
return;
}
return;
}
if (!InneractiveAdManager.wasInitialized()) {
InneractiveAdSpot.RequestListener requestListener3 = this.b;
if (requestListener3 != null) {
requestListener3.onInneractiveFailedAdRequest(this, InneractiveErrorCode.SDK_NOT_INITIALIZED);
return;
}
return;
}
com.fyber.inneractive.sdk.metrics.d.d.a(this.a).g();
String str2 = this.a;
this.l = new l(str2);
if (this.d == null) {
this.d = new u(this);
}
com.fyber.inneractive.sdk.bidder.adm.f fVar = new com.fyber.inneractive.sdk.bidder.adm.f(str, str2);
com.fyber.inneractive.sdk.config.global.s b2 = com.fyber.inneractive.sdk.config.global.s.b();
a aVar = new a(fVar, b2, str);
IAConfigManager iAConfigManager = IAConfigManager.L;
com.fyber.inneractive.sdk.measurement.a aVar2 = iAConfigManager.I;
if (aVar2 == null || !aVar2.a) {
IAlog.a("%sinitOmidSdk", IAlog.a(this));
com.fyber.inneractive.sdk.util.p.a.execute(new com.fyber.inneractive.sdk.config.r(iAConfigManager, com.fyber.inneractive.sdk.util.o.a));
}
com.fyber.inneractive.sdk.util.p.a.execute(new com.fyber.inneractive.sdk.bidder.adm.b(fVar, aVar, b2));
}
@Override // com.fyber.inneractive.sdk.external.InneractiveAdSpot
public final void setMediationName(String str) {
InneractiveAdManager.setMediationName(str);
}
@Override // com.fyber.inneractive.sdk.external.InneractiveAdSpot
public final void setRequestListener(InneractiveAdSpot.RequestListener requestListener) {
IAlog.a("%ssetRequestListener called with: %s", IAlog.a(this), requestListener);
this.b = requestListener;
}
@Override // com.fyber.inneractive.sdk.flow.w
public final void a() {
q qVar;
q qVar2 = this.e;
if (qVar2 != null) {
if (qVar2.e() && (qVar = this.e) != null && !qVar.e) {
com.fyber.inneractive.sdk.response.e d = qVar.d();
com.fyber.inneractive.sdk.util.p.b.post(new v(this, Arrays.toString(Thread.currentThread().getStackTrace()), this.e.a, d));
}
this.e.a();
this.e = null;
}
this.f = null;
}
@Override // com.fyber.inneractive.sdk.external.InneractiveAdSpot
public final boolean isReady() {
boolean z;
q qVar;
com.fyber.inneractive.sdk.response.e d;
Long valueOf;
Long valueOf2;
q qVar2 = this.e;
if (qVar2 == null) {
return false;
}
if (qVar2.d() != null) {
com.fyber.inneractive.sdk.response.e d2 = this.e.d();
d2.getClass();
if (d2.a < System.currentTimeMillis()) {
z = true;
if (z && (qVar = this.e) != null) {
d = qVar.d();
if (!this.k && d != null) {
long minutes = TimeUnit.MILLISECONDS.toMinutes(System.currentTimeMillis() - d.c);
long j = d.b;
long j2 = minutes - j;
IAlog.a(String.format("Firing Event 802 - AdExpired - time passed- %s, sessionTimeOut - %s", Long.valueOf(j2), Long.valueOf(j)), new Object[0]);
s.a aVar = new s.a(com.fyber.inneractive.sdk.network.q.IA_AD_EXPIRED, qVar.a, d, qVar.c.c());
JSONObject jSONObject = new JSONObject();
valueOf = Long.valueOf(j2);
try {
jSONObject.put("time_passed", valueOf);
} catch (Exception unused) {
IAlog.f("Got exception adding param to json object: %s, %s", "time_passed", valueOf);
}
valueOf2 = Long.valueOf(j);
try {
jSONObject.put("timeout", valueOf2);
} catch (Exception unused2) {
IAlog.f("Got exception adding param to json object: %s, %s", "timeout", valueOf2);
}
aVar.f.put(jSONObject);
aVar.a((String) null);
this.k = true;
}
}
return !z && this.e.g();
}
}
z = false;
if (z) {
d = qVar.d();
if (!this.k) {
long minutes2 = TimeUnit.MILLISECONDS.toMinutes(System.currentTimeMillis() - d.c);
long j3 = d.b;
long j22 = minutes2 - j3;
IAlog.a(String.format("Firing Event 802 - AdExpired - time passed- %s, sessionTimeOut - %s", Long.valueOf(j22), Long.valueOf(j3)), new Object[0]);
s.a aVar2 = new s.a(com.fyber.inneractive.sdk.network.q.IA_AD_EXPIRED, qVar.a, d, qVar.c.c());
JSONObject jSONObject2 = new JSONObject();
valueOf = Long.valueOf(j22);
jSONObject2.put("time_passed", valueOf);
valueOf2 = Long.valueOf(j3);
jSONObject2.put("timeout", valueOf2);
aVar2.f.put(jSONObject2);
aVar2.a((String) null);
this.k = true;
}
}
if (z) {
return false;
}
}
/* JADX WARN: Removed duplicated region for block: B:22:0x006d */
/* JADX WARN: Removed duplicated region for block: B:25:0x007f */
/* JADX WARN: Removed duplicated region for block: B:27:0x0050 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void a(com.fyber.inneractive.sdk.external.InneractiveAdRequest r10, com.fyber.inneractive.sdk.response.e r11) {
/*
r9 = this;
r0 = 0
if (r10 == 0) goto L33
com.fyber.inneractive.sdk.config.f0 r1 = r10.getSelectedUnitConfig()
if (r1 == 0) goto L33
com.fyber.inneractive.sdk.config.f0 r1 = r10.getSelectedUnitConfig()
com.fyber.inneractive.sdk.config.e0 r1 = (com.fyber.inneractive.sdk.config.e0) r1
com.fyber.inneractive.sdk.config.x r1 = r1.c
if (r1 == 0) goto L1e
com.fyber.inneractive.sdk.config.f0 r1 = r10.getSelectedUnitConfig()
com.fyber.inneractive.sdk.config.e0 r1 = (com.fyber.inneractive.sdk.config.e0) r1
com.fyber.inneractive.sdk.config.x r1 = r1.c
com.fyber.inneractive.sdk.config.enums.UnitDisplayType r1 = r1.b
goto L34
L1e:
com.fyber.inneractive.sdk.config.f0 r1 = r10.getSelectedUnitConfig()
com.fyber.inneractive.sdk.config.e0 r1 = (com.fyber.inneractive.sdk.config.e0) r1
com.fyber.inneractive.sdk.config.g0 r1 = r1.f
if (r1 == 0) goto L33
com.fyber.inneractive.sdk.config.f0 r1 = r10.getSelectedUnitConfig()
com.fyber.inneractive.sdk.config.e0 r1 = (com.fyber.inneractive.sdk.config.e0) r1
com.fyber.inneractive.sdk.config.g0 r1 = r1.f
com.fyber.inneractive.sdk.config.enums.UnitDisplayType r1 = r1.j
goto L34
L33:
r1 = r0
L34:
com.fyber.inneractive.sdk.flow.q r2 = r9.e
if (r2 == 0) goto L3e
T extends com.fyber.inneractive.sdk.response.e r2 = r2.b
if (r2 == 0) goto L3e
r4 = r2
goto L3f
L3e:
r4 = r11
L3f:
java.lang.String r11 = r9.a
if (r1 != 0) goto L47
if (r4 == 0) goto L47
com.fyber.inneractive.sdk.config.enums.UnitDisplayType r1 = r4.n
L47:
r7 = r1
com.fyber.inneractive.sdk.metrics.c r1 = new com.fyber.inneractive.sdk.metrics.c
com.fyber.inneractive.sdk.flow.q r2 = r9.e
if (r2 != 0) goto L50
L4e:
r8 = r0
goto L57
L50:
com.fyber.inneractive.sdk.config.global.s r0 = r2.c
org.json.JSONArray r0 = r0.c()
goto L4e
L57:
r3 = r1
r5 = r10
r6 = r11
r3.<init>(r4, r5, r6, r7, r8)
com.fyber.inneractive.sdk.metrics.d r10 = com.fyber.inneractive.sdk.metrics.d.d
com.fyber.inneractive.sdk.metrics.g r0 = r10.a(r11)
java.util.HashMap r2 = r0.j()
boolean r3 = r0.a()
if (r3 != 0) goto L7f
com.fyber.inneractive.sdk.metrics.g r10 = r10.a(r11)
java.lang.String r10 = r10.toString()
java.lang.Object[] r10 = new java.lang.Object[]{r10}
java.lang.String r11 = "MetricCreativeReporter: Metric data not valid, data: %s"
com.fyber.inneractive.sdk.util.IAlog.a(r11, r10)
goto L8e
L7f:
java.util.HashMap r10 = r10.a
r10.remove(r11)
com.fyber.inneractive.sdk.metrics.b r10 = new com.fyber.inneractive.sdk.metrics.b
r10.<init>(r1, r0, r2)
java.util.concurrent.ThreadPoolExecutor r11 = com.fyber.inneractive.sdk.util.p.a
r11.execute(r10)
L8e:
return
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.flow.t.a(com.fyber.inneractive.sdk.external.InneractiveAdRequest, com.fyber.inneractive.sdk.response.e):void");
}
}

View File

@@ -0,0 +1,50 @@
package com.fyber.inneractive.sdk.flow;
import com.fyber.inneractive.sdk.external.InneractiveAdRequest;
import com.fyber.inneractive.sdk.external.InneractiveAdSpot;
import com.fyber.inneractive.sdk.external.InneractiveInfrastructureError;
import com.fyber.inneractive.sdk.flow.k;
import com.fyber.inneractive.sdk.flow.t;
import org.json.JSONArray;
/* loaded from: classes2.dex */
public final class u implements k.a {
public final /* synthetic */ t a;
public u(t tVar) {
this.a = tVar;
}
public final void a(InneractiveAdRequest inneractiveAdRequest, InneractiveInfrastructureError inneractiveInfrastructureError, com.fyber.inneractive.sdk.response.e eVar) {
com.fyber.inneractive.sdk.config.global.s sVar;
if (this.a.b != null) {
if (inneractiveInfrastructureError.getErrorCode().shouldSendTimeMetric()) {
this.a.a(inneractiveAdRequest, eVar);
}
t tVar = this.a;
if (!tVar.j) {
t.c cVar = tVar.i;
if (cVar != null) {
cVar.onAdRefreshFailed(tVar, inneractiveInfrastructureError.getErrorCode());
return;
}
return;
}
j jVar = tVar.h;
l lVar = tVar.l;
JSONArray jSONArray = null;
com.fyber.inneractive.sdk.config.global.s sVar2 = lVar != null ? lVar.c : null;
if (jVar != null && (sVar = jVar.c) != null) {
jSONArray = sVar.c();
} else if (sVar2 != null) {
jSONArray = sVar2.c();
}
a.a(inneractiveAdRequest, inneractiveInfrastructureError, tVar.e, eVar, jSONArray);
t tVar2 = this.a;
InneractiveAdSpot.RequestListener requestListener = tVar2.b;
if (requestListener != null) {
requestListener.onInneractiveFailedAdRequest(tVar2, inneractiveInfrastructureError.getErrorCode());
}
}
}
}

View File

@@ -0,0 +1,44 @@
package com.fyber.inneractive.sdk.flow;
import com.fyber.inneractive.sdk.external.InneractiveAdRequest;
import com.fyber.inneractive.sdk.network.s;
import com.fyber.inneractive.sdk.util.IAlog;
import org.json.JSONObject;
/* loaded from: classes2.dex */
public final class v implements Runnable {
public final /* synthetic */ String a;
public final /* synthetic */ InneractiveAdRequest b;
public final /* synthetic */ com.fyber.inneractive.sdk.response.e c;
public final /* synthetic */ t d;
public v(t tVar, String str, InneractiveAdRequest inneractiveAdRequest, com.fyber.inneractive.sdk.response.e eVar) {
this.d = tVar;
this.a = str;
this.b = inneractiveAdRequest;
this.c = eVar;
}
@Override // java.lang.Runnable
public final void run() {
com.fyber.inneractive.sdk.config.global.s sVar;
IAlog.a("Firing Event 803 - Stack trace - %s", this.a);
com.fyber.inneractive.sdk.network.q qVar = com.fyber.inneractive.sdk.network.q.IA_AD_DESTROYED_WITHOUT_SHOW;
InneractiveAdRequest inneractiveAdRequest = this.b;
com.fyber.inneractive.sdk.response.e eVar = this.c;
t tVar = this.d;
j jVar = tVar.h;
l lVar = tVar.l;
com.fyber.inneractive.sdk.config.global.s sVar2 = lVar != null ? lVar.c : null;
s.a aVar = new s.a(qVar, inneractiveAdRequest, eVar, (jVar == null || (sVar = jVar.c) == null) ? sVar2 != null ? sVar2.c() : null : sVar.c());
JSONObject jSONObject = new JSONObject();
String str = this.a;
try {
jSONObject.put("stack_trace", str);
} catch (Exception unused) {
IAlog.f("Got exception adding param to json object: %s, %s", "stack_trace", str);
}
aVar.f.put(jSONObject);
aVar.a((String) null);
}
}

View File

@@ -0,0 +1,36 @@
package com.fyber.inneractive.sdk.flow.vast;
import android.view.View;
import java.util.Comparator;
/* loaded from: classes2.dex */
public class a {
public int d;
public String e;
public boolean a = false;
public View b = null;
public boolean c = false;
public final EnumC0072a f = EnumC0072a.HIGH;
/* renamed from: com.fyber.inneractive.sdk.flow.vast.a$a, reason: collision with other inner class name */
public enum EnumC0072a {
HIGH,
LOW
}
public static class b implements Comparator<a> {
@Override // java.util.Comparator
public final int compare(a aVar, a aVar2) {
return aVar.f.ordinal() - aVar2.f.ordinal();
}
}
public void a() {
this.b = null;
this.a = false;
}
public final void a(com.fyber.inneractive.sdk.web.h hVar) {
this.b = hVar;
}
}

View File

@@ -0,0 +1,41 @@
package com.fyber.inneractive.sdk.flow.vast;
import com.fyber.inneractive.sdk.config.enums.UnitDisplayType;
import com.fyber.inneractive.sdk.config.f0;
/* loaded from: classes2.dex */
public final class b {
public final UnitDisplayType a;
public final boolean b;
public final int c;
public final int d;
public final f0 e;
public b(UnitDisplayType unitDisplayType, boolean z, int i, int i2, f0 f0Var) {
this.a = unitDisplayType;
this.b = z;
this.c = i;
this.d = i2;
this.e = f0Var;
}
public final int a() {
return this.d;
}
public final f0 b() {
return this.e;
}
public final UnitDisplayType c() {
return this.a;
}
public final int d() {
return this.c;
}
public final boolean e() {
return this.b;
}
}

View File

@@ -0,0 +1,15 @@
package com.fyber.inneractive.sdk.flow.vast;
/* loaded from: classes2.dex */
public final class c extends e {
public boolean h;
public boolean i;
public boolean j;
public c(com.fyber.inneractive.sdk.player.controller.c cVar) {
super(cVar);
this.h = false;
this.i = false;
this.j = false;
}
}

View File

@@ -0,0 +1,500 @@
package com.fyber.inneractive.sdk.flow.vast;
import android.text.TextUtils;
import com.facebook.internal.security.CertificateUtil;
import com.fyber.inneractive.sdk.config.IAConfigManager;
import com.fyber.inneractive.sdk.flow.vast.g;
import com.fyber.inneractive.sdk.model.vast.l;
import com.fyber.inneractive.sdk.model.vast.m;
import com.fyber.inneractive.sdk.model.vast.n;
import com.fyber.inneractive.sdk.model.vast.p;
import com.fyber.inneractive.sdk.model.vast.q;
import com.fyber.inneractive.sdk.model.vast.r;
import com.fyber.inneractive.sdk.model.vast.s;
import com.fyber.inneractive.sdk.model.vast.u;
import com.fyber.inneractive.sdk.model.vast.v;
import com.fyber.inneractive.sdk.model.vast.x;
import com.fyber.inneractive.sdk.util.IAlog;
import com.fyber.inneractive.sdk.util.a0;
import com.fyber.inneractive.sdk.util.o;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
/* loaded from: classes2.dex */
public final class d {
public int a = -1;
public int b = -1;
public int c = -1;
public boolean d = false;
public boolean e = false;
public final LinkedHashMap f = new LinkedHashMap();
public final ArrayList g = new ArrayList();
public final ArrayList h = new ArrayList();
public final ArrayList i = new ArrayList();
public final ArrayList j = new ArrayList();
public class a extends Exception {
public final int a;
public a(String str, int i) {
super(str);
this.a = i;
}
}
public final void a(com.fyber.inneractive.sdk.model.vast.b bVar, com.fyber.inneractive.sdk.model.vast.g gVar, int i) throws a {
String str;
ArrayList arrayList;
Integer num;
Integer num2;
String str2;
ArrayList arrayList2 = gVar.h;
if (arrayList2.size() > 0) {
Iterator it = arrayList2.iterator();
while (it.hasNext()) {
if (!a0.f((String) it.next())) {
throw new a("Found non-secure click tracking url for companion: " + gVar, 0);
}
}
if (i > 0) {
this.h.add(gVar);
}
}
String str3 = gVar.g;
if (!a0.f(str3)) {
throw new a("Found non-secure click through url: " + str3, 0);
}
if (TextUtils.isEmpty(gVar.f) && TextUtils.isEmpty(gVar.e) && gVar.d == null) {
if (this.i.contains(gVar)) {
return;
}
this.i.add(gVar);
return;
}
Integer num3 = gVar.a;
Integer num4 = gVar.b;
if (num3 == null || num4 == null || num3.intValue() < 100 || num4.intValue() < 100) {
throw new a("Incompatible size: " + num3 + "," + num4, 16);
}
ArrayList arrayList3 = gVar.j;
Iterator it2 = arrayList3.iterator();
while (it2.hasNext()) {
u uVar = (u) it2.next();
if (!a0.f(uVar.b)) {
throw new a("Found non-secure tracking event: " + uVar, 0);
}
}
String str4 = gVar.c;
com.fyber.inneractive.sdk.model.vast.k kVar = gVar.d;
if (kVar != null) {
com.fyber.inneractive.sdk.model.vast.j a2 = com.fyber.inneractive.sdk.model.vast.j.a(kVar.a);
if (a2 == null) {
throw new a("Found invalid creative type:" + kVar.a, 0);
}
str = str4;
arrayList = arrayList3;
num = num4;
num2 = num3;
str2 = str3;
a(bVar, com.fyber.inneractive.sdk.model.vast.h.Static, i, num3.intValue(), num4.intValue(), str4, str3, arrayList2, arrayList, kVar.b, a2);
} else {
str = str4;
arrayList = arrayList3;
num = num4;
num2 = num3;
str2 = str3;
}
String str5 = gVar.e;
if (!TextUtils.isEmpty(str5)) {
if (!a0.f(str5)) {
throw new a("Found non-secure iframe url:" + str5, 0);
}
a(bVar, com.fyber.inneractive.sdk.model.vast.h.Iframe, i, num2.intValue(), num.intValue(), str, str2, arrayList2, arrayList, str5, null);
}
String str6 = gVar.f;
if (!TextUtils.isEmpty(str6)) {
a(bVar, com.fyber.inneractive.sdk.model.vast.h.Html, i, num2.intValue(), num.intValue(), str, str2, arrayList2, arrayList, str6, null);
}
bVar.g.size();
}
public final com.fyber.inneractive.sdk.model.vast.b a(com.fyber.inneractive.sdk.model.vast.e eVar, ArrayList arrayList, String str) throws i {
int g = o.g();
int f = o.f();
IAlog.a("%sprocess started", "VastProcessor: ");
if (eVar != null && eVar.c != null) {
com.fyber.inneractive.sdk.model.vast.b bVar = new com.fyber.inneractive.sdk.model.vast.b(new h(this.c, g, f), new f(g, f));
bVar.a = str;
ArrayList arrayList2 = eVar.c.c;
if (arrayList2 != null && !arrayList2.isEmpty()) {
if (arrayList == null && eVar.b != null) {
arrayList = new ArrayList();
arrayList.add(eVar);
}
if (arrayList != null) {
Iterator it = arrayList.iterator();
while (it.hasNext()) {
x xVar = ((com.fyber.inneractive.sdk.model.vast.e) it.next()).b;
if (xVar != null) {
a(bVar, xVar);
}
}
}
a(bVar, eVar.c);
if (bVar.d.size() == 0) {
if (this.f.isEmpty()) {
throw new i("ErrorNoMediaFiles", "No media files exist after merge");
}
throw new i("ErrorNoCompatibleMediaFile", "No compatible media files after filtering");
}
ArrayList arrayList3 = new ArrayList(bVar.g);
Collections.sort(arrayList3, bVar.h);
if (!arrayList3.isEmpty()) {
Iterator it2 = this.i.iterator();
while (it2.hasNext()) {
com.fyber.inneractive.sdk.model.vast.g gVar = (com.fyber.inneractive.sdk.model.vast.g) it2.next();
if (TextUtils.isEmpty(gVar.f) && TextUtils.isEmpty(gVar.e) && gVar.d == null) {
Iterator it3 = arrayList3.iterator();
while (it3.hasNext()) {
com.fyber.inneractive.sdk.model.vast.c cVar = (com.fyber.inneractive.sdk.model.vast.c) it3.next();
ArrayList arrayList4 = gVar.h;
if (arrayList4 != null) {
Iterator it4 = arrayList4.iterator();
while (it4.hasNext()) {
cVar.a(v.EVENT_CLICK, (String) it4.next());
}
}
String str2 = gVar.g;
if (TextUtils.isEmpty(cVar.g)) {
cVar.g = str2;
}
ArrayList arrayList5 = gVar.j;
if (arrayList5 != null) {
Iterator it5 = arrayList5.iterator();
while (it5.hasNext()) {
u uVar = (u) it5.next();
v a2 = v.a(uVar.a);
String str3 = uVar.b;
if (a2 != null && str3 != null) {
cVar.a(a2, str3);
}
}
}
}
}
}
}
int i = 0;
if (IAlog.a == 2) {
IAlog.e("%sLogging merged model media files: ", "VastProcessor: ");
Iterator it6 = bVar.c().iterator();
int i2 = 0;
while (it6.hasNext()) {
IAlog.e("%s(%d) %s", "VastProcessor: ", Integer.valueOf(i2), (q) it6.next());
i2++;
}
}
if (IAlog.a == 2) {
IAlog.e("%sLogging merged model companion ads: ", "VastProcessor: ");
ArrayList arrayList6 = new ArrayList(bVar.g);
Collections.sort(arrayList6, bVar.h);
if (arrayList6.size() > 0) {
Iterator it7 = arrayList6.iterator();
while (it7.hasNext()) {
IAlog.e("%s(%d) %s", "VastProcessor: ", Integer.valueOf(i), ((com.fyber.inneractive.sdk.model.vast.c) it7.next()).a());
i++;
}
} else {
IAlog.e("%sNo companion ads found!", "VastProcessor: ");
}
}
return bVar;
}
throw new i("ErrorNoMediaFiles", "Empty inline with no creatives");
}
IAlog.a("%sno inline found", "VastProcessor: ");
throw new i("ErrorNoMediaFiles", "Empty inline ad found");
}
public final void a(com.fyber.inneractive.sdk.model.vast.b bVar, com.fyber.inneractive.sdk.model.vast.f fVar) {
String[] split;
g gVar;
Integer num;
HashMap hashMap;
List list;
String str;
IAlog.a("%sprocessing ad element: %s", "VastProcessor: ", fVar);
ArrayList arrayList = fVar.b;
if (arrayList != null) {
Iterator it = arrayList.iterator();
while (it.hasNext()) {
String str2 = (String) it.next();
IAlog.a("%sadding impression url: %s", "VastProcessor: ", str2);
v vVar = v.EVENT_IMPRESSION;
if (a0.f(str2)) {
bVar.a(vVar, str2);
} else {
throw new i("VastErrorUnsecure", "found unsecure tracking event: " + vVar.e());
}
}
}
String str3 = fVar.a;
if (!TextUtils.isEmpty(str3)) {
IAlog.a("%sadding error url: %s", "VastProcessor: ", str3);
bVar.a(v.EVENT_ERROR, str3);
}
if (IAConfigManager.L.I != null) {
Iterator it2 = fVar.d.iterator();
while (it2.hasNext()) {
com.fyber.inneractive.sdk.measurement.f fVar2 = (com.fyber.inneractive.sdk.measurement.f) it2.next();
if (fVar2.g && fVar2.a != null && ((str = fVar2.b) == null || (!TextUtils.isEmpty(str) && fVar2.b.equalsIgnoreCase(CampaignEx.KEY_OMID)))) {
bVar.e.add(fVar2);
} else {
v vVar2 = v.EVENT_VERIFICATION_NOT_EXECUTED;
if (vVar2 != null && (hashMap = fVar2.c) != null && (list = (List) hashMap.get(vVar2)) != null && list.size() > 0) {
com.fyber.inneractive.sdk.player.e.a(new com.fyber.inneractive.sdk.measurement.e(fVar2.a(vVar2), com.fyber.inneractive.sdk.measurement.g.VERIFICATION_NOT_SUPPORTED), vVar2);
}
this.j.add(fVar2);
}
}
}
n nVar = fVar.e;
if (nVar != null) {
bVar.f = nVar;
}
Iterator it3 = fVar.c.iterator();
while (true) {
if (it3.hasNext()) {
l lVar = (l) it3.next();
p pVar = lVar.a;
if (pVar != null) {
ArrayList arrayList2 = pVar.a;
if (arrayList2 != null) {
bVar.k = arrayList2.size();
Iterator it4 = arrayList2.iterator();
while (it4.hasNext()) {
q qVar = (q) it4.next();
String str4 = qVar.a;
r rVar = r.progressive;
if (!str4.equals(rVar.e())) {
gVar = new g(g.a.UNSUPPORTED_DELIVERY, rVar.e());
} else {
if (this.b > -1 && (num = qVar.e) != null && num.intValue() != 0) {
int intValue = qVar.e.intValue();
int i = this.a;
if (intValue < i) {
gVar = new g(g.a.BITRATE_NOT_IN_RANGE, Integer.valueOf(i));
} else {
int intValue2 = qVar.e.intValue();
int i2 = this.b;
if (intValue2 > i2) {
gVar = new g(g.a.BITRATE_NOT_IN_RANGE, Integer.valueOf(i2));
}
}
}
if (s.a(qVar.d) == s.UNKNOWN) {
gVar = new g(g.a.UNSUPPORTED_MIME_TYPE, null);
} else if (this.d && qVar.b.intValue() >= qVar.c.intValue()) {
gVar = new g(g.a.VERTICAL_VIDEO_EXPECTED, null);
} else {
String str5 = qVar.f;
if (str5 != null && this.e && str5.equalsIgnoreCase("VPAID")) {
gVar = new g(g.a.FILTERED_BY_APP_OR_UNIT, null);
} else if (TextUtils.isEmpty(qVar.g)) {
gVar = new g(g.a.NO_CONTENT, null);
} else {
gVar = !a0.f(qVar.g) ? new g(g.a.UNSECURED_VIDEO_URL, null) : null;
}
}
}
if (gVar != null) {
IAlog.a("%smedia file filtered!: %s", "VastProcessor: ", qVar);
IAlog.a("%s-- %s", "VastProcessor: ", qVar);
IAlog.a("%s-- %s", "VastProcessor: ", gVar);
this.f.put(qVar, gVar);
} else {
IAlog.a("%sadding media file: %s", "VastProcessor: ", qVar);
bVar.d.add(qVar);
bVar.l.add(qVar);
bVar.j++;
}
}
}
ArrayList arrayList3 = pVar.d;
if (arrayList3 != null) {
Iterator it5 = arrayList3.iterator();
while (it5.hasNext()) {
String str6 = (String) it5.next();
v vVar3 = v.EVENT_CLICK;
if (a0.f(str6)) {
bVar.a(vVar3, str6);
} else {
throw new i("VastErrorUnsecure", "found unsecure tracking event: " + vVar3.e());
}
}
}
ArrayList arrayList4 = pVar.b;
if (arrayList4 != null) {
Iterator it6 = arrayList4.iterator();
while (it6.hasNext()) {
u uVar = (u) it6.next();
v a2 = v.a(uVar.a);
if (a2 != v.UNKNOWN) {
bVar.a(a2, uVar.b);
}
if (a2 == v.EVENT_PROGRESS) {
String str7 = uVar.b;
String str8 = uVar.c;
com.fyber.inneractive.sdk.model.vast.d dVar = new com.fyber.inneractive.sdk.model.vast.d(str7, str8);
if (!TextUtils.isEmpty(str7) && !TextUtils.isEmpty(str8) && dVar.d != 0) {
bVar.n.add(dVar);
}
}
}
}
if (!TextUtils.isEmpty(pVar.c)) {
bVar.b = pVar.c;
}
String str9 = pVar.e;
if (!TextUtils.isEmpty(str9) && (split = str9.split(CertificateUtil.DELIMITER)) != null && split.length <= 3 && split.length != 1) {
if (split.length == 2) {
try {
String str10 = split[1];
String str11 = split[0];
} catch (NumberFormatException unused) {
}
} else {
String str12 = split[2];
String str13 = split[1];
String str14 = split[0];
}
}
}
com.fyber.inneractive.sdk.model.vast.i iVar = lVar.b;
ArrayList<com.fyber.inneractive.sdk.model.vast.g> arrayList5 = iVar != null ? iVar.a : null;
if (arrayList5 != null) {
for (com.fyber.inneractive.sdk.model.vast.g gVar2 : arrayList5) {
try {
a(bVar, gVar2, fVar.f);
} catch (a e) {
IAlog.a("Failed processing companion ad: %s error = %s", gVar2, e.getMessage());
gVar2.i = e;
this.g.add(gVar2);
}
}
}
} else {
ArrayList arrayList6 = fVar.g;
String str15 = arrayList6.isEmpty() ? null : ((m) arrayList6.get(0)).a;
if (TextUtils.isEmpty(str15)) {
return;
}
bVar.o = str15;
return;
}
}
}
public final void a(com.fyber.inneractive.sdk.model.vast.b bVar, com.fyber.inneractive.sdk.model.vast.h hVar, int i, int i2, int i3, String str, String str2, ArrayList arrayList, ArrayList arrayList2, String str3, com.fyber.inneractive.sdk.model.vast.j jVar) {
com.fyber.inneractive.sdk.model.vast.c cVar = new com.fyber.inneractive.sdk.model.vast.c(hVar, i2, i3, str, i);
cVar.g = str2;
Iterator it = arrayList2.iterator();
while (it.hasNext()) {
u uVar = (u) it.next();
cVar.a(v.a(uVar.a), uVar.b);
}
Iterator it2 = arrayList.iterator();
while (it2.hasNext()) {
cVar.a(v.EVENT_CLICK, (String) it2.next());
}
a(cVar);
cVar.f = str3;
cVar.b = jVar;
bVar.g.add(cVar);
bVar.m.add(cVar);
}
/* JADX ERROR: NullPointerException in pass: LoopRegionVisitor
java.lang.NullPointerException: Cannot invoke "jadx.core.dex.instructions.args.SSAVar.use(jadx.core.dex.instructions.args.RegisterArg)" because "ssaVar" is null
at jadx.core.dex.nodes.InsnNode.rebindArgs(InsnNode.java:493)
at jadx.core.dex.nodes.InsnNode.rebindArgs(InsnNode.java:496)
*/
public final void a(com.fyber.inneractive.sdk.model.vast.c r7) {
/*
r6 = this;
java.util.ArrayList r0 = r6.h
boolean r0 = r0.isEmpty()
if (r0 != 0) goto L90
int r0 = r7.h
if (r0 <= 0) goto L1b
java.util.ArrayList r0 = r6.h
int r1 = r0.size()
int r1 = r1 + (-1)
java.lang.Object r0 = r0.remove(r1)
com.fyber.inneractive.sdk.model.vast.g r0 = (com.fyber.inneractive.sdk.model.vast.g) r0
goto L1c
L1b:
r0 = 0
L1c:
java.lang.String r1 = r7.e
java.util.ArrayList r2 = r6.h
java.util.Iterator r2 = r2.iterator()
L24:
boolean r3 = r2.hasNext()
if (r3 == 0) goto L89
java.lang.Object r3 = r2.next()
com.fyber.inneractive.sdk.model.vast.g r3 = (com.fyber.inneractive.sdk.model.vast.g) r3
java.lang.String r4 = r3.c
if (r1 == 0) goto L3a
boolean r5 = r1.equals(r4)
if (r5 != 0) goto L65
L3a:
if (r4 != 0) goto L50
int r4 = r7.c
java.lang.Integer r5 = r3.a
int r5 = r5.intValue()
if (r4 != r5) goto L50
int r4 = r7.d
java.lang.Integer r5 = r3.b
int r5 = r5.intValue()
if (r4 == r5) goto L65
L50:
java.lang.String r4 = r3.f
boolean r4 = android.text.TextUtils.isEmpty(r4)
if (r4 == 0) goto L24
java.lang.String r4 = r3.e
boolean r4 = android.text.TextUtils.isEmpty(r4)
if (r4 == 0) goto L24
com.fyber.inneractive.sdk.model.vast.k r4 = r3.d
if (r4 == 0) goto L65
goto L24
L65:
java.util.ArrayList r3 = r3.h
int r4 = r3.size()
if (r4 <= 0) goto L24
java.util.Iterator r3 = r3.iterator()
L71:
boolean r4 = r3.hasNext()
if (r4 == 0) goto L24
java.lang.Object r4 = r3.next()
java.lang.String r4 = (java.lang.String) r4
boolean r5 = com.fyber.inneractive.sdk.util.a0.f(r4)
if (r5 == 0) goto L71
com.fyber.inneractive.sdk.model.vast.v r5 = com.fyber.inneractive.sdk.model.vast.v.EVENT_CLICK
r7.a(r5, r4)
goto L71
L89:
if (r0 == 0) goto L90
java.util.ArrayList r7 = r6.h
r7.add(r0)
L90:
return
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.flow.vast.d.a(com.fyber.inneractive.sdk.model.vast.c):void");
}
}

View File

@@ -0,0 +1,24 @@
package com.fyber.inneractive.sdk.flow.vast;
import com.fyber.inneractive.sdk.web.g0;
/* loaded from: classes2.dex */
public class e extends a {
public final com.fyber.inneractive.sdk.player.controller.c g;
public e(com.fyber.inneractive.sdk.player.controller.c cVar) {
this.g = cVar;
a(cVar.a());
}
@Override // com.fyber.inneractive.sdk.flow.vast.a
public final void a() {
super.a();
com.fyber.inneractive.sdk.player.controller.c cVar = this.g;
g0 g0Var = cVar.a;
if (g0Var != null) {
g0Var.d();
cVar.a = null;
}
}
}

View File

@@ -0,0 +1,46 @@
package com.fyber.inneractive.sdk.flow.vast;
import com.fyber.inneractive.sdk.util.t;
import java.util.Comparator;
/* loaded from: classes2.dex */
public final class f implements Comparator<com.fyber.inneractive.sdk.model.vast.c> {
public final int a;
public final float b;
public f(int i, int i2) {
this.a = i * i2;
this.b = i / i2;
}
@Override // java.util.Comparator
public final int compare(com.fyber.inneractive.sdk.model.vast.c cVar, com.fyber.inneractive.sdk.model.vast.c cVar2) {
com.fyber.inneractive.sdk.model.vast.c cVar3 = cVar;
com.fyber.inneractive.sdk.model.vast.c cVar4 = cVar2;
int a = t.a(cVar3.h, cVar4.h);
if (a != 0) {
return a;
}
com.fyber.inneractive.sdk.model.vast.h hVar = cVar3.a;
com.fyber.inneractive.sdk.model.vast.h hVar2 = com.fyber.inneractive.sdk.model.vast.h.Html;
int i = Integer.MAX_VALUE;
int i2 = hVar == hVar2 ? 1 : hVar == com.fyber.inneractive.sdk.model.vast.h.Iframe ? 2 : hVar == com.fyber.inneractive.sdk.model.vast.h.Static ? 3 : Integer.MAX_VALUE;
com.fyber.inneractive.sdk.model.vast.h hVar3 = cVar4.a;
if (hVar3 == hVar2) {
i = 1;
} else if (hVar3 == com.fyber.inneractive.sdk.model.vast.h.Iframe) {
i = 2;
} else if (hVar3 == com.fyber.inneractive.sdk.model.vast.h.Static) {
i = 3;
}
int a2 = t.a(i2, i);
if (a2 != 0) {
return a2;
}
int a3 = t.a(Math.abs((cVar3.c * cVar3.d) - this.a), Math.abs((cVar4.c * cVar4.d) - this.a));
if (a3 != 0) {
return a3;
}
return Float.compare(Math.abs((cVar3.c / cVar3.d) - this.b), Math.abs((cVar4.c / cVar4.d) - this.b));
}
}

View File

@@ -0,0 +1,36 @@
package com.fyber.inneractive.sdk.flow.vast;
/* loaded from: classes2.dex */
public final class g {
public final a a;
public final Object b;
public enum a {
BITRATE_NOT_IN_RANGE("BITRATE_NOT_IN_RANGE"),
UNSUPPORTED_MIME_TYPE("UNSUPPORTED_MIME_TYPE"),
UNSUPPORTED_DELIVERY("UNSUPPORTED_DELIVERY"),
UNSECURED_VIDEO_URL("UNSECURED_VIDEO_URL"),
VERTICAL_VIDEO_EXPECTED("VERTICAL_VIDEO_EXPECTED"),
FILTERED_BY_APP_OR_UNIT("FILTERED_BY_APP_OR_UNIT"),
NO_CONTENT("NO_CONTENT");
int value;
a(String str) {
this.value = r2;
}
}
public g() {
throw null;
}
public g(a aVar, Object obj) {
this.a = aVar;
this.b = obj;
}
public final String toString() {
return "Media File inc error:: type = " + this.a + " expected value = " + this.b;
}
}

View File

@@ -0,0 +1,80 @@
package com.fyber.inneractive.sdk.flow.vast;
import android.text.TextUtils;
import com.fyber.inneractive.sdk.model.vast.q;
import com.fyber.inneractive.sdk.model.vast.s;
import java.util.Comparator;
/* loaded from: classes2.dex */
public final class h implements Comparator<q> {
public final int a;
public final int b;
public final int c;
public h(int i, int i2, int i3) {
this.a = i;
this.b = i2;
this.c = i3;
}
@Override // java.util.Comparator
public final int compare(q qVar, q qVar2) {
q qVar3 = qVar;
q qVar4 = qVar2;
int i = -1;
if (TextUtils.equals("VPAID", qVar4.f)) {
return -1;
}
if (!TextUtils.equals("VPAID", qVar3.f)) {
Integer num = qVar3.e;
int intValue = num == null ? 0 : num.intValue();
Integer num2 = qVar4.e;
int intValue2 = num2 == null ? 0 : num2.intValue();
int i2 = this.a;
if (intValue2 > i2 && intValue <= i2) {
return -1;
}
if (intValue <= i2 || intValue2 > i2) {
s a = s.a(qVar4.d);
s sVar = s.MEDIA_TYPE_MP4;
Integer num3 = a == sVar ? 3 : a == s.MEDIA_TYPE_3GPP ? 2 : a == s.MEDIA_TYPE_WEBM ? 1 : -1;
s a2 = s.a(qVar3.d);
if (a2 == sVar) {
i = 3;
} else if (a2 == s.MEDIA_TYPE_3GPP) {
i = 2;
} else if (a2 == s.MEDIA_TYPE_WEBM) {
i = 1;
}
int compareTo = num3.compareTo(i);
if (compareTo != 0) {
return compareTo;
}
if (intValue >= intValue2) {
if (intValue > intValue2) {
return -1;
}
Integer num4 = qVar3.b;
int intValue3 = num4 == null ? 0 : num4.intValue();
Integer num5 = qVar3.c;
int intValue4 = num5 == null ? 0 : num5.intValue();
Integer num6 = qVar4.b;
int intValue5 = num6 == null ? 0 : num6.intValue();
Integer num7 = qVar4.c;
int i3 = intValue3 * intValue4;
int intValue6 = intValue5 * (num7 == null ? 0 : num7.intValue());
int i4 = this.b * this.c;
int abs = Math.abs(i3 - i4);
int abs2 = Math.abs(intValue6 - i4);
if (abs < abs2) {
return -1;
}
if (abs <= abs2) {
return 0;
}
}
}
}
return 1;
}
}

View File

@@ -0,0 +1,8 @@
package com.fyber.inneractive.sdk.flow.vast;
/* loaded from: classes2.dex */
public final class i extends Error {
public i(String str, String str2) {
super(str, new Throwable(str2));
}
}

View File

@@ -0,0 +1,11 @@
package com.fyber.inneractive.sdk.flow.vast;
import java.util.ArrayList;
/* loaded from: classes2.dex */
public final class j extends ArrayList<com.fyber.inneractive.sdk.measurement.f> {
public j(com.fyber.inneractive.sdk.response.g gVar) {
addAll(gVar.d().d());
addAll(gVar.c());
}
}

View File

@@ -0,0 +1,36 @@
package com.fyber.inneractive.sdk.flow.vast;
/* loaded from: classes2.dex */
public final class k {
/* JADX WARN: Can't wrap try/catch for region: R(20:0|1|(3:3|(1:5)|132)(2:133|(3:135|(4:141|(8:144|145|146|(1:148)(1:156)|149|(2:151|152)(2:154|155)|153|142)|159|160)|132)(2:161|(1:163)(3:164|(1:166)(2:167|(1:169)(2:170|(1:172)(16:173|(5:8|(1:10)(1:15)|11|(1:13)|14)|16|(9:20|(1:22)(1:59)|23|(14:26|27|28|29|(1:31)(1:46)|32|(1:34)|35|(1:37)|(1:39)|40|(2:42|43)(1:45)|44|24)|52|53|54|55|56)|60|(1:62)(1:131)|63|(1:65)(1:130)|66|(1:68)(1:129)|69|70|71|72|(2:74|(9:76|(1:78)(1:124)|79|(10:82|83|84|85|(1:114)(1:95)|96|(1:113)|112|111|80)|117|118|119|120|121))|125)))|132)))|6|(0)|16|(10:18|20|(0)(0)|23|(1:24)|52|53|54|55|56)|60|(0)(0)|63|(0)(0)|66|(0)(0)|69|70|71|72|(0)|125|(1:(2:112|111))) */
/* JADX WARN: Code restructure failed: missing block: B:109:0x02c2, code lost:
r8.put(r2);
*/
/* JADX WARN: Code restructure failed: missing block: B:128:0x0223, code lost:
com.fyber.inneractive.sdk.util.IAlog.f("Got exception adding param to json object: %s, %s", "number_of_endcards", r0);
*/
/* JADX WARN: Removed duplicated region for block: B:129:0x020c */
/* JADX WARN: Removed duplicated region for block: B:130:0x0203 */
/* JADX WARN: Removed duplicated region for block: B:131:0x01f9 */
/* JADX WARN: Removed duplicated region for block: B:22:0x013c */
/* JADX WARN: Removed duplicated region for block: B:26:0x0159 */
/* JADX WARN: Removed duplicated region for block: B:59:0x013e */
/* JADX WARN: Removed duplicated region for block: B:62:0x01f2 */
/* JADX WARN: Removed duplicated region for block: B:65:0x01fe */
/* JADX WARN: Removed duplicated region for block: B:68:0x020a */
/* JADX WARN: Removed duplicated region for block: B:74:0x0236 */
/* JADX WARN: Removed duplicated region for block: B:8:0x0111 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public static com.fyber.inneractive.sdk.external.InneractiveErrorCode a(com.fyber.inneractive.sdk.external.InneractiveAdRequest r17, com.fyber.inneractive.sdk.response.g r18, com.fyber.inneractive.sdk.config.global.s r19) {
/*
Method dump skipped, instructions count: 732
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.flow.vast.k.a(com.fyber.inneractive.sdk.external.InneractiveAdRequest, com.fyber.inneractive.sdk.response.g, com.fyber.inneractive.sdk.config.global.s):com.fyber.inneractive.sdk.external.InneractiveErrorCode");
}
}

View File

@@ -0,0 +1,8 @@
package com.fyber.inneractive.sdk.flow;
import com.fyber.inneractive.sdk.external.InneractiveAdSpot;
/* loaded from: classes2.dex */
public interface w extends InneractiveAdSpot {
void a();
}

View File

@@ -0,0 +1,38 @@
package com.fyber.inneractive.sdk.flow;
import com.fyber.inneractive.sdk.external.InneractiveAdSpot;
import com.fyber.inneractive.sdk.external.InneractiveContentController;
import com.fyber.inneractive.sdk.external.InneractiveContentController.EventsListener;
import java.lang.ref.WeakReference;
/* loaded from: classes2.dex */
public abstract class x<EventsListenerT extends InneractiveContentController.EventsListener> implements InneractiveContentController<EventsListenerT> {
protected WeakReference<InneractiveAdSpot> mAdSpot;
protected EventsListenerT mEventsListener;
public abstract boolean canControl(InneractiveAdSpot inneractiveAdSpot);
@Override // com.fyber.inneractive.sdk.external.InneractiveContentController
public void destroy() {
this.mEventsListener = null;
this.mAdSpot = null;
}
@Override // com.fyber.inneractive.sdk.external.InneractiveContentController
public InneractiveAdSpot getAdSpot() {
return (InneractiveAdSpot) com.fyber.inneractive.sdk.util.t.a(this.mAdSpot);
}
public EventsListenerT getEventsListener() {
return this.mEventsListener;
}
public void setAdSpot(InneractiveAdSpot inneractiveAdSpot) {
this.mAdSpot = new WeakReference<>(inneractiveAdSpot);
}
@Override // com.fyber.inneractive.sdk.external.InneractiveContentController
public void setEventsListener(EventsListenerT eventslistenert) {
this.mEventsListener = eventslistenert;
}
}

View File

@@ -0,0 +1,59 @@
package com.fyber.inneractive.sdk.flow;
import com.fyber.inneractive.sdk.util.IAlog;
import com.fyber.inneractive.sdk.util.c1;
import java.util.concurrent.TimeUnit;
/* loaded from: classes2.dex */
public final class y implements Runnable {
public final /* synthetic */ long a;
public final /* synthetic */ z b;
public class a implements Runnable {
public a() {
}
@Override // java.lang.Runnable
public final void run() {
y.this.b.e(!r0.t);
y.this.b.n = null;
}
}
public y(z zVar, long j) {
this.b = zVar;
this.a = j;
}
@Override // java.lang.Runnable
public final void run() {
if (this.b.H()) {
z zVar = this.b;
zVar.n = new a();
long a2 = zVar.a(this.a);
z zVar2 = this.b;
zVar2.getClass();
c1 c1Var = new c1(TimeUnit.MILLISECONDS, a2);
zVar2.o = c1Var;
c1Var.e = new b0(zVar2);
c1.a aVar = new c1.a(c1Var);
c1Var.c = aVar;
c1Var.d = false;
aVar.sendEmptyMessage(1932593528);
z zVar3 = this.b;
zVar3.getClass();
IAlog.a("%sad contains custom close. Will show transparent x in %d", IAlog.a(zVar3), Long.valueOf(a2));
this.b.l = null;
} else {
z zVar4 = this.b;
zVar4.getClass();
IAlog.a("%sad does not contain custom close. Showing close button", IAlog.a(zVar4));
this.b.e(false);
}
Runnable runnable = this.b.l;
if (runnable != null) {
com.fyber.inneractive.sdk.util.p.b.removeCallbacks(runnable);
this.b.l = null;
}
}
}

View File

@@ -0,0 +1,311 @@
package com.fyber.inneractive.sdk.flow;
import android.app.Activity;
import android.content.res.Resources;
import android.os.CountDownTimer;
import android.os.SystemClock;
import android.view.View;
import com.fyber.inneractive.sdk.external.InneractiveAdRequest;
import com.fyber.inneractive.sdk.external.InneractiveAdSpot;
import com.fyber.inneractive.sdk.external.InneractiveUnitController;
import com.fyber.inneractive.sdk.external.InneractiveUnitController.EventsListener;
import com.fyber.inneractive.sdk.flow.q;
import com.fyber.inneractive.sdk.interfaces.c;
import com.fyber.inneractive.sdk.network.s;
import com.fyber.inneractive.sdk.util.IAlog;
import com.fyber.inneractive.sdk.util.c1;
import java.util.concurrent.TimeUnit;
import org.json.JSONArray;
import org.json.JSONObject;
/* loaded from: classes2.dex */
public abstract class z<AdContent extends q, EventsListener extends InneractiveUnitController.EventsListener> extends r<AdContent, EventsListener> implements com.fyber.inneractive.sdk.interfaces.c {
public c.a k;
public Runnable l;
public c1 m;
public Runnable n;
public c1 o;
public long r;
public a v;
public boolean p = false;
public boolean q = false;
public boolean s = false;
public boolean t = false;
public final com.fyber.inneractive.sdk.util.a u = new com.fyber.inneractive.sdk.util.a();
public class a extends CountDownTimer {
public a(long j) {
super(j, 1000L);
}
@Override // android.os.CountDownTimer
public final void onFinish() {
a aVar = z.this.v;
if (aVar != null) {
aVar.cancel();
}
z.this.e(false);
}
@Override // android.os.CountDownTimer
public final void onTick(long j) {
int i = ((int) j) / 1000;
c.a aVar = z.this.k;
if (aVar != null) {
aVar.updateCloseCountdown(i);
}
}
}
@Override // com.fyber.inneractive.sdk.flow.r
public final int A() {
c.a aVar = this.k;
if (aVar == null || aVar.getLayout() == null) {
return 1;
}
return this.k.getLayout().getWidth();
}
@Override // com.fyber.inneractive.sdk.flow.r
public final void C() {
super.C();
}
public abstract boolean H();
public abstract int J();
public abstract int K();
public abstract long L();
public abstract boolean M();
public abstract long a(long j);
public abstract boolean b(AdContent adcontent);
@Override // com.fyber.inneractive.sdk.interfaces.c
public void c(boolean z) {
}
@Override // com.fyber.inneractive.sdk.flow.r, com.fyber.inneractive.sdk.external.InneractiveAdRenderer
public final void initialize(InneractiveAdSpot inneractiveAdSpot) {
super.initialize(inneractiveAdSpot);
this.u.a = inneractiveAdSpot;
}
@Override // com.fyber.inneractive.sdk.flow.r
public final View y() {
c.a aVar = this.k;
if (aVar != null) {
return aVar.getLayout();
}
return null;
}
@Override // com.fyber.inneractive.sdk.flow.r
public final int z() {
c.a aVar = this.k;
if (aVar == null || aVar.getLayout() == null) {
return 1;
}
return this.k.getLayout().getHeight();
}
public final void I() {
if (this.l == null) {
long L = L();
this.r = L;
this.l = new y(this, L);
IAlog.a("%senabling close with delay %d", IAlog.a(this), Long.valueOf(this.r));
AdContent adcontent = this.b;
boolean b = adcontent != null ? b((z<AdContent, EventsListener>) adcontent) : false;
if (b && !H()) {
if (b) {
c.a aVar = this.k;
if (aVar != null) {
aVar.showCloseCountdown();
}
a aVar2 = new a(this.r + 100);
this.v = aVar2;
aVar2.start();
return;
}
return;
}
if (this.q) {
return;
}
this.q = true;
c1 c1Var = new c1(TimeUnit.MILLISECONDS, this.r);
this.m = c1Var;
c1Var.e = new a0(this);
c1.a aVar3 = new c1.a(c1Var);
c1Var.c = aVar3;
c1Var.d = false;
aVar3.sendEmptyMessage(1932593528);
}
}
public final void d(boolean z) {
s.a aVar;
if (this.b == null) {
aVar = new s.a(com.fyber.inneractive.sdk.network.r.MRAID_CUSTOM_CLOSE_DETECTED, (InneractiveAdRequest) null, (com.fyber.inneractive.sdk.response.e) null, (JSONArray) null);
} else {
com.fyber.inneractive.sdk.network.r rVar = com.fyber.inneractive.sdk.network.r.MRAID_CUSTOM_CLOSE_DETECTED;
AdContent adcontent = this.b;
aVar = new s.a(rVar, adcontent.a, adcontent.d(), this.b.c.c());
}
JSONObject jSONObject = new JSONObject();
Boolean valueOf = Boolean.valueOf(z);
try {
jSONObject.put("fyber_close_enabled", valueOf);
} catch (Exception unused) {
IAlog.f("Got exception adding param to json object: %s, %s", "fyber_close_enabled", valueOf);
}
aVar.f.put(jSONObject);
aVar.a((String) null);
}
@Override // com.fyber.inneractive.sdk.flow.r, com.fyber.inneractive.sdk.external.InneractiveAdRenderer
public void destroy() {
Runnable runnable = this.l;
if (runnable != null) {
com.fyber.inneractive.sdk.util.p.b.removeCallbacks(runnable);
this.l = null;
}
Runnable runnable2 = this.n;
if (runnable2 != null) {
com.fyber.inneractive.sdk.util.p.b.removeCallbacks(runnable2);
this.n = null;
}
c.a aVar = this.k;
if (aVar != null) {
aVar.destroy();
}
this.k = null;
a aVar2 = this.v;
if (aVar2 != null) {
aVar2.cancel();
this.v = null;
}
c1 c1Var = this.o;
if (c1Var != null) {
c1Var.e = null;
this.o = null;
}
c1 c1Var2 = this.m;
if (c1Var2 != null) {
c1Var2.e = null;
this.m = null;
}
super.destroy();
}
@Override // com.fyber.inneractive.sdk.interfaces.c
public void t() {
c1 c1Var = this.m;
if (c1Var != null) {
c1Var.d = false;
long uptimeMillis = SystemClock.uptimeMillis();
long uptimeMillis2 = (SystemClock.uptimeMillis() - uptimeMillis) + 50 + c1Var.f;
c1Var.f = uptimeMillis2;
if (c1Var.e == null || uptimeMillis2 <= c1Var.a.toMillis(c1Var.b)) {
c1.a aVar = c1Var.c;
if (aVar != null && c1Var.e != null) {
aVar.removeMessages(1932593528);
c1Var.c.sendEmptyMessageDelayed(1932593528, 50L);
}
} else {
c1Var.e.a();
}
}
c1 c1Var2 = this.o;
if (c1Var2 != null) {
c1Var2.d = false;
long uptimeMillis3 = SystemClock.uptimeMillis();
long uptimeMillis4 = (SystemClock.uptimeMillis() - uptimeMillis3) + 50 + c1Var2.f;
c1Var2.f = uptimeMillis4;
if (c1Var2.e != null && uptimeMillis4 > c1Var2.a.toMillis(c1Var2.b)) {
c1Var2.e.a();
return;
}
c1.a aVar2 = c1Var2.c;
if (aVar2 == null || c1Var2.e == null) {
return;
}
aVar2.removeMessages(1932593528);
c1Var2.c.sendEmptyMessageDelayed(1932593528, 50L);
}
}
@Override // com.fyber.inneractive.sdk.interfaces.c
public void v() {
c1 c1Var = this.m;
if (c1Var != null) {
c1Var.d = true;
c1.a aVar = c1Var.c;
if (aVar != null) {
aVar.removeMessages(1932593528);
}
}
c1 c1Var2 = this.o;
if (c1Var2 != null) {
c1Var2.d = true;
c1.a aVar2 = c1Var2.c;
if (aVar2 != null) {
aVar2.removeMessages(1932593528);
}
}
}
public final void e(boolean z) {
s.a aVar;
this.p = true;
if (z) {
if (this.b == null) {
aVar = new s.a(com.fyber.inneractive.sdk.network.r.FAIL_SAFE_ACTIVATED, (InneractiveAdRequest) null, (com.fyber.inneractive.sdk.response.e) null, (JSONArray) null);
} else {
com.fyber.inneractive.sdk.network.r rVar = com.fyber.inneractive.sdk.network.r.FAIL_SAFE_ACTIVATED;
AdContent adcontent = this.b;
aVar = new s.a(rVar, adcontent.a, adcontent.d(), this.b.c.c());
}
JSONObject jSONObject = new JSONObject();
Boolean valueOf = Boolean.valueOf(M());
try {
jSONObject.put("is_endcard", valueOf);
} catch (Exception unused) {
IAlog.f("Got exception adding param to json object: %s, %s", "is_endcard", valueOf);
}
aVar.f.put(jSONObject);
aVar.a((String) null);
}
c.a aVar2 = this.k;
if (aVar2 != null) {
aVar2.showCloseButton(z, K(), J());
if (z) {
return;
}
com.fyber.inneractive.sdk.util.a aVar3 = this.u;
aVar3.d = 0L;
aVar3.e = 0L;
aVar3.f = 0L;
aVar3.b = false;
aVar3.a(false);
}
}
public void a(c.a aVar, Activity activity) throws InneractiveUnitController.AdDisplayError, Resources.NotFoundException {
if (this.a == null) {
IAlog.f("%sYou must set the spot to render before calling renderAd", IAlog.a(this));
throw new InneractiveUnitController.AdDisplayError("No spot ad to render");
}
if (aVar != null) {
this.k = aVar;
} else {
IAlog.f("%srenderAd called with a null activity!", IAlog.a(this));
throw new InneractiveUnitController.AdDisplayError("Activity is null");
}
}
}