Files
Daniel Elliott f9d20bb3fc 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>
2026-02-18 14:52:23 -08:00

501 lines
22 KiB
Java

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");
}
}