- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
344 lines
12 KiB
Java
344 lines
12 KiB
Java
package com.applovin.impl;
|
|
|
|
import android.text.TextUtils;
|
|
import android.webkit.WebView;
|
|
import com.applovin.impl.sdk.utils.StringUtils;
|
|
import com.iab.omid.library.applovin.adsession.AdSession;
|
|
import com.iab.omid.library.applovin.adsession.AdSessionConfiguration;
|
|
import com.iab.omid.library.applovin.adsession.AdSessionContext;
|
|
import com.iab.omid.library.applovin.adsession.CreativeType;
|
|
import com.iab.omid.library.applovin.adsession.ImpressionType;
|
|
import com.iab.omid.library.applovin.adsession.Owner;
|
|
import com.iab.omid.library.applovin.adsession.VerificationScriptResource;
|
|
import com.iab.omid.library.applovin.adsession.media.InteractionType;
|
|
import com.iab.omid.library.applovin.adsession.media.MediaEvents;
|
|
import com.iab.omid.library.applovin.adsession.media.Position;
|
|
import com.iab.omid.library.applovin.adsession.media.VastProperties;
|
|
import com.mbridge.msdk.foundation.entity.CampaignEx;
|
|
import java.net.URL;
|
|
import java.util.ArrayList;
|
|
import java.util.Iterator;
|
|
import java.util.List;
|
|
import java.util.concurrent.atomic.AtomicBoolean;
|
|
|
|
/* loaded from: classes.dex */
|
|
public class sg extends mg {
|
|
static final /* synthetic */ boolean p = true;
|
|
private final aq h;
|
|
private final AtomicBoolean i;
|
|
private MediaEvents j;
|
|
private final VastProperties k;
|
|
private final AtomicBoolean l;
|
|
private final AtomicBoolean m;
|
|
private final AtomicBoolean n;
|
|
private final AtomicBoolean o;
|
|
|
|
public sg(aq aqVar) {
|
|
super(aqVar);
|
|
this.i = new AtomicBoolean();
|
|
this.l = new AtomicBoolean();
|
|
this.m = new AtomicBoolean();
|
|
this.n = new AtomicBoolean();
|
|
this.o = new AtomicBoolean();
|
|
this.h = aqVar;
|
|
float q1 = aqVar.q1();
|
|
if (aqVar.q1() == -1) {
|
|
this.k = VastProperties.createVastPropertiesForNonSkippableMedia(true, Position.STANDALONE);
|
|
} else {
|
|
this.k = VastProperties.createVastPropertiesForSkippableMedia(q1, true, Position.STANDALONE);
|
|
}
|
|
}
|
|
|
|
@Override // com.applovin.impl.mg
|
|
public AdSessionConfiguration a() {
|
|
try {
|
|
CreativeType creativeType = CreativeType.VIDEO;
|
|
ImpressionType impressionType = ImpressionType.BEGIN_TO_RENDER;
|
|
Owner owner = Owner.NATIVE;
|
|
return AdSessionConfiguration.createAdSessionConfiguration(creativeType, impressionType, owner, owner, false);
|
|
} catch (Throwable th) {
|
|
if (com.applovin.impl.sdk.n.a()) {
|
|
this.c.a(this.d, "Failed to create ad session configuration", th);
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public /* synthetic */ void p() {
|
|
this.g.loaded(this.k);
|
|
}
|
|
|
|
@Override // com.applovin.impl.mg
|
|
public void h() {
|
|
b("track loaded", new Runnable() { // from class: com.applovin.impl.sg$$ExternalSyntheticLambda1
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
sg.this.p();
|
|
}
|
|
});
|
|
}
|
|
|
|
public void b(final float f, final boolean z) {
|
|
if (this.l.compareAndSet(false, true)) {
|
|
b("track started", new Runnable() { // from class: com.applovin.impl.sg$$ExternalSyntheticLambda5
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
sg.this.a(f, z);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
public void x() {
|
|
if (this.m.compareAndSet(false, true)) {
|
|
b("track first quartile", new Runnable() { // from class: com.applovin.impl.sg$$ExternalSyntheticLambda10
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
sg.this.o();
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public /* synthetic */ void o() {
|
|
this.j.firstQuartile();
|
|
}
|
|
|
|
public void y() {
|
|
if (this.n.compareAndSet(false, true)) {
|
|
b("track midpoint", new Runnable() { // from class: com.applovin.impl.sg$$ExternalSyntheticLambda0
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
sg.this.q();
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public /* synthetic */ void q() {
|
|
this.j.midpoint();
|
|
}
|
|
|
|
public void C() {
|
|
if (this.o.compareAndSet(false, true)) {
|
|
b("track third quartile", new Runnable() { // from class: com.applovin.impl.sg$$ExternalSyntheticLambda7
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
sg.this.u();
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public /* synthetic */ void u() {
|
|
this.j.thirdQuartile();
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public /* synthetic */ void n() {
|
|
this.j.complete();
|
|
}
|
|
|
|
public void w() {
|
|
b("track completed", new Runnable() { // from class: com.applovin.impl.sg$$ExternalSyntheticLambda11
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
sg.this.n();
|
|
}
|
|
});
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public /* synthetic */ void r() {
|
|
this.j.pause();
|
|
}
|
|
|
|
public void z() {
|
|
b("track paused", new Runnable() { // from class: com.applovin.impl.sg$$ExternalSyntheticLambda9
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
sg.this.r();
|
|
}
|
|
});
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public /* synthetic */ void s() {
|
|
this.j.resume();
|
|
}
|
|
|
|
public void A() {
|
|
b("track resumed", new Runnable() { // from class: com.applovin.impl.sg$$ExternalSyntheticLambda2
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
sg.this.s();
|
|
}
|
|
});
|
|
}
|
|
|
|
public void j() {
|
|
if (this.i.compareAndSet(false, true)) {
|
|
b("buffer started", new Runnable() { // from class: com.applovin.impl.sg$$ExternalSyntheticLambda3
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
sg.this.l();
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public /* synthetic */ void l() {
|
|
this.j.bufferStart();
|
|
}
|
|
|
|
public void i() {
|
|
if (this.i.compareAndSet(true, false)) {
|
|
b("buffer finished", new Runnable() { // from class: com.applovin.impl.sg$$ExternalSyntheticLambda8
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
sg.this.k();
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public /* synthetic */ void k() {
|
|
this.j.bufferFinish();
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public /* synthetic */ void t() {
|
|
this.j.skipped();
|
|
}
|
|
|
|
public void B() {
|
|
b("track skipped", new Runnable() { // from class: com.applovin.impl.sg$$ExternalSyntheticLambda4
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
sg.this.t();
|
|
}
|
|
});
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public /* synthetic */ void m() {
|
|
this.j.adUserInteraction(InteractionType.CLICK);
|
|
}
|
|
|
|
public void v() {
|
|
b("track clicked", new Runnable() { // from class: com.applovin.impl.sg$$ExternalSyntheticLambda6
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
sg.this.m();
|
|
}
|
|
});
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public /* synthetic */ void a(float f, boolean z) {
|
|
this.j.start(f, z ? 0.0f : 1.0f);
|
|
}
|
|
|
|
public void b(final boolean z) {
|
|
b("track volume changed", new Runnable() { // from class: com.applovin.impl.sg$$ExternalSyntheticLambda12
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
sg.this.a(z);
|
|
}
|
|
});
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public /* synthetic */ void a(boolean z) {
|
|
this.j.volumeChange(z ? 0.0f : 1.0f);
|
|
}
|
|
|
|
@Override // com.applovin.impl.mg
|
|
public void a(AdSession adSession) {
|
|
try {
|
|
this.j = MediaEvents.createMediaEvents(adSession);
|
|
} catch (Throwable th) {
|
|
if (com.applovin.impl.sdk.n.a()) {
|
|
this.c.a(this.d, "Failed to create media events", th);
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // com.applovin.impl.mg
|
|
public AdSessionContext a(WebView webView) {
|
|
VerificationScriptResource createVerificationScriptResourceWithoutParameters;
|
|
if (!p && this.h.i1() == null) {
|
|
throw new AssertionError();
|
|
}
|
|
ArrayList arrayList = new ArrayList();
|
|
for (bq bqVar : this.h.i1().a()) {
|
|
List<hq> b = bqVar.b();
|
|
if (b.isEmpty()) {
|
|
mq.a(bqVar.a(), fq.FAILED_TO_LOAD_RESOURCE, this.b);
|
|
} else {
|
|
ArrayList arrayList2 = new ArrayList();
|
|
for (hq hqVar : b) {
|
|
if (CampaignEx.KEY_OMID.equalsIgnoreCase(hqVar.a())) {
|
|
arrayList2.add(hqVar);
|
|
}
|
|
}
|
|
if (arrayList2.isEmpty()) {
|
|
mq.a(bqVar.a(), fq.API_FRAMEWORK_OR_LANGUAGE_TYPE_NOT_SUPPORTED, this.b);
|
|
} else {
|
|
ArrayList<URL> arrayList3 = new ArrayList();
|
|
Iterator it = arrayList2.iterator();
|
|
while (it.hasNext()) {
|
|
try {
|
|
arrayList3.add(new URL(((hq) it.next()).b()));
|
|
} catch (Throwable th) {
|
|
if (com.applovin.impl.sdk.n.a()) {
|
|
this.c.a(this.d, "Failed to parse JavaScript resource url", th);
|
|
}
|
|
}
|
|
}
|
|
if (arrayList3.isEmpty()) {
|
|
mq.a(bqVar.a(), fq.FAILED_TO_LOAD_RESOURCE, this.b);
|
|
} else {
|
|
String d = bqVar.d();
|
|
String c = bqVar.c();
|
|
if (StringUtils.isValidString(d) && !StringUtils.isValidString(c)) {
|
|
mq.a(bqVar.a(), fq.FAILED_TO_LOAD_RESOURCE, this.b);
|
|
} else {
|
|
for (URL url : arrayList3) {
|
|
if (StringUtils.isValidString(d)) {
|
|
createVerificationScriptResourceWithoutParameters = VerificationScriptResource.createVerificationScriptResourceWithParameters(c, url, d);
|
|
} else {
|
|
createVerificationScriptResourceWithoutParameters = VerificationScriptResource.createVerificationScriptResourceWithoutParameters(url);
|
|
}
|
|
arrayList.add(createVerificationScriptResourceWithoutParameters);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
String a = this.b.W().a();
|
|
if (TextUtils.isEmpty(a)) {
|
|
if (com.applovin.impl.sdk.n.a()) {
|
|
this.c.b(this.d, "JavaScript SDK content not loaded successfully");
|
|
}
|
|
return null;
|
|
}
|
|
try {
|
|
return AdSessionContext.createNativeAdSessionContext(this.b.W().b(), a, arrayList, this.h.getOpenMeasurementContentUrl(), this.h.getOpenMeasurementCustomReferenceData());
|
|
} catch (Throwable th2) {
|
|
if (!com.applovin.impl.sdk.n.a()) {
|
|
return null;
|
|
}
|
|
this.c.a(this.d, "Failed to create ad session context", th2);
|
|
return null;
|
|
}
|
|
}
|
|
}
|