- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
183 lines
7.4 KiB
Java
183 lines
7.4 KiB
Java
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);
|
|
}
|
|
}
|