- 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
160 lines
5.5 KiB
Java
160 lines
5.5 KiB
Java
package com.applovin.impl;
|
|
|
|
import android.content.Context;
|
|
import android.util.Log;
|
|
import com.applovin.impl.sdk.utils.StringUtils;
|
|
import com.applovin.impl.tm;
|
|
import com.applovin.sdk.AppLovinSdk;
|
|
import com.applovin.sdk.AppLovinSdkUtils;
|
|
import com.applovin.sdk.R;
|
|
import com.facebook.internal.AnalyticsEvents;
|
|
import com.iab.omid.library.applovin.Omid;
|
|
import com.iab.omid.library.applovin.ScriptInjector;
|
|
import com.iab.omid.library.applovin.adsession.Partner;
|
|
import com.ironsource.v8;
|
|
import java.io.BufferedReader;
|
|
import java.io.IOException;
|
|
import java.io.InputStreamReader;
|
|
|
|
/* loaded from: classes.dex */
|
|
public class qg {
|
|
private final com.applovin.impl.sdk.j a;
|
|
private final Context b = com.applovin.impl.sdk.j.l();
|
|
private String c;
|
|
|
|
public String a() {
|
|
return this.c;
|
|
}
|
|
|
|
public String c() {
|
|
return Omid.getVersion();
|
|
}
|
|
|
|
public boolean d() {
|
|
return Omid.isActive();
|
|
}
|
|
|
|
public qg(com.applovin.impl.sdk.j jVar) {
|
|
this.a = jVar;
|
|
}
|
|
|
|
public void i() {
|
|
if (((Boolean) this.a.a(sj.h0)).booleanValue()) {
|
|
this.a.J();
|
|
if (com.applovin.impl.sdk.n.a()) {
|
|
this.a.J().a("OpenMeasurementService", "Initializing Open Measurement SDK v" + c() + "...");
|
|
}
|
|
AppLovinSdkUtils.runOnUiThread(new Runnable() { // from class: com.applovin.impl.qg$$ExternalSyntheticLambda1
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
qg.this.g();
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public /* synthetic */ void g() {
|
|
long currentTimeMillis = System.currentTimeMillis();
|
|
Omid.activate(this.b);
|
|
this.a.J();
|
|
if (com.applovin.impl.sdk.n.a()) {
|
|
com.applovin.impl.sdk.n J = this.a.J();
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("Init ");
|
|
sb.append(d() ? AnalyticsEvents.PARAMETER_SHARE_OUTCOME_SUCCEEDED : v8.h.t);
|
|
sb.append(" and took ");
|
|
sb.append(System.currentTimeMillis() - currentTimeMillis);
|
|
sb.append("ms");
|
|
J.a("OpenMeasurementService", sb.toString());
|
|
}
|
|
h();
|
|
}
|
|
|
|
public Partner b() {
|
|
return Partner.createPartner((String) this.a.a(sj.i0), AppLovinSdk.VERSION);
|
|
}
|
|
|
|
private void h() {
|
|
this.a.j0().a((yl) new jn(this.a, "OpenMeasurementService", new Runnable() { // from class: com.applovin.impl.qg$$ExternalSyntheticLambda0
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
qg.this.f();
|
|
}
|
|
}), tm.b.OTHER);
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public /* synthetic */ void f() {
|
|
if (this.c != null) {
|
|
return;
|
|
}
|
|
try {
|
|
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(this.b.getResources().openRawResource(R.raw.omsdk_v1_4_12)));
|
|
try {
|
|
try {
|
|
StringBuilder sb = new StringBuilder();
|
|
while (true) {
|
|
String readLine = bufferedReader.readLine();
|
|
if (readLine != null) {
|
|
sb.append(readLine);
|
|
} else {
|
|
this.c = sb.toString();
|
|
bufferedReader.close();
|
|
return;
|
|
}
|
|
}
|
|
} catch (IOException e) {
|
|
Log.e("OpenMeasurementService", "Failed to close the BufferReader for reading JavaScript Open Measurement SDK", e);
|
|
}
|
|
} catch (Throwable th) {
|
|
try {
|
|
Log.e("OpenMeasurementService", "Failed to load JavaScript Open Measurement SDK", th);
|
|
bufferedReader.close();
|
|
} catch (Throwable th2) {
|
|
try {
|
|
bufferedReader.close();
|
|
} catch (IOException e2) {
|
|
Log.e("OpenMeasurementService", "Failed to close the BufferReader for reading JavaScript Open Measurement SDK", e2);
|
|
}
|
|
throw th2;
|
|
}
|
|
}
|
|
} catch (Throwable th3) {
|
|
this.a.J();
|
|
if (com.applovin.impl.sdk.n.a()) {
|
|
this.a.J().a("OpenMeasurementService", "Failed to retrieve resource omsdk_v1_4_12.js", th3);
|
|
}
|
|
}
|
|
}
|
|
|
|
public boolean e() {
|
|
String str = this.a.g0().getExtraParameters().get("enable_omsdk_testing");
|
|
if (StringUtils.isValidString(str)) {
|
|
return Boolean.parseBoolean(str);
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public String a(String str) {
|
|
String str2;
|
|
try {
|
|
if (e()) {
|
|
String a = rg.a(this.a);
|
|
if (StringUtils.isValidString(a)) {
|
|
str2 = ScriptInjector.injectScriptContentIntoHtml(a, str);
|
|
return ScriptInjector.injectScriptContentIntoHtml(this.c, str2);
|
|
}
|
|
}
|
|
str2 = str;
|
|
return ScriptInjector.injectScriptContentIntoHtml(this.c, str2);
|
|
} catch (Throwable th) {
|
|
this.a.J();
|
|
if (com.applovin.impl.sdk.n.a()) {
|
|
this.a.J().a("OpenMeasurementService", "Failed to inject JavaScript SDK into HTML", th);
|
|
}
|
|
return str;
|
|
}
|
|
}
|
|
}
|