正在查看: Handling Master v2 应用的 j.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Handling Master v2 应用的 j.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.applovin.impl.sdk;
import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.text.TextUtils;
import android.util.Log;
import com.applovin.impl.a1;
import com.applovin.impl.a3;
import com.applovin.impl.b3;
import com.applovin.impl.e2;
import com.applovin.impl.e4;
import com.applovin.impl.f3;
import com.applovin.impl.f6;
import com.applovin.impl.g3;
import com.applovin.impl.h5;
import com.applovin.impl.j3;
import com.applovin.impl.k1;
import com.applovin.impl.k3;
import com.applovin.impl.k4;
import com.applovin.impl.l2;
import com.applovin.impl.l3;
import com.applovin.impl.l4;
import com.applovin.impl.m0;
import com.applovin.impl.m4;
import com.applovin.impl.m6;
import com.applovin.impl.mediation.MaxSegmentCollectionImpl;
import com.applovin.impl.mediation.MediationServiceImpl;
import com.applovin.impl.n0;
import com.applovin.impl.n3;
import com.applovin.impl.n4;
import com.applovin.impl.o4;
import com.applovin.impl.p0;
import com.applovin.impl.privacy.cmp.CmpServiceImpl;
import com.applovin.impl.q5;
import com.applovin.impl.r2;
import com.applovin.impl.r5;
import com.applovin.impl.s6;
import com.applovin.impl.sdk.array.ArrayService;
import com.applovin.impl.sdk.nativeAd.AppLovinNativeAdService;
import com.applovin.impl.sdk.network.PostbackServiceImpl;
import com.applovin.impl.sdk.utils.CollectionUtils;
import com.applovin.impl.sdk.utils.JsonUtils;
import com.applovin.impl.sdk.utils.StringUtils;
import com.applovin.impl.t7;
import com.applovin.impl.v1;
import com.applovin.impl.w1;
import com.applovin.impl.w3;
import com.applovin.impl.w4;
import com.applovin.impl.x;
import com.applovin.impl.x6;
import com.applovin.impl.x7;
import com.applovin.impl.y1;
import com.applovin.impl.y6;
import com.applovin.impl.z0;
import com.applovin.impl.z6;
import com.applovin.mediation.MaxAdFormat;
import com.applovin.mediation.MaxSegmentCollection;
import com.applovin.mediation.adapter.MaxAdapter;
import com.applovin.sdk.AppLovinSdk;
import com.applovin.sdk.AppLovinSdkConfiguration;
import com.applovin.sdk.AppLovinSdkInitializationConfiguration;
import com.applovin.sdk.AppLovinSdkSettings;
import com.applovin.sdk.AppLovinSdkUtils;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
import org.json.JSONException;
import org.json.JSONObject;
public class j {
private static volatile com.applovin.impl.c A0;
public static j v0;
protected static Context w0;
private static boolean x0;
private static final boolean z0;
private String a;
private WeakReference b;
private final long c;
private long d;
private List e0;
private final AppLovinSdkSettings f;
private MaxSegmentCollection g;
private String h;
private boolean i0;
private volatile AppLovinSdk m;
private String n0;
private AppLovinSdkInitializationConfiguration o0;
private AppLovinSdk.SdkInitializationListener r0;
private AppLovinSdk.SdkInitializationListener s0;
private static final Object B0 = new Object();
private static final long y0 = System.currentTimeMillis();
private final AtomicBoolean e = new AtomicBoolean();
private final AtomicReference i = new AtomicReference();
private final AtomicReference j = new AtomicReference();
private final AtomicReference k = new AtomicReference();
private final AtomicReference l = new AtomicReference();
private final n n = new n(this);
private final com.applovin.impl.f o = new com.applovin.impl.f(this);
private final r2 p = new r2(this);
private final k1 q = new k1(this);
private final x6 r = new x6(this);
private final AtomicReference s = new AtomicReference();
private final AtomicReference t = new AtomicReference();
private final AtomicReference u = new AtomicReference();
private final AtomicReference v = new AtomicReference();
private final AtomicReference w = new AtomicReference();
private final AtomicReference x = new AtomicReference();
private final AtomicReference y = new AtomicReference();
private final AtomicReference z = new AtomicReference();
private final AtomicReference A = new AtomicReference();
private final AtomicReference B = new AtomicReference();
private final AtomicReference C = new AtomicReference();
private final AtomicReference D = new AtomicReference();
private final AtomicReference E = new AtomicReference();
private final AtomicReference F = new AtomicReference();
private final AtomicReference G = new AtomicReference();
private final AtomicReference H = new AtomicReference();
private final AtomicReference I = new AtomicReference();
private final AtomicReference J = new AtomicReference();
private final AtomicReference K = new AtomicReference();
private final AtomicReference L = new AtomicReference();
private final AtomicReference M = new AtomicReference();
private final AtomicReference N = new AtomicReference();
private final AtomicReference O = new AtomicReference();
private final AtomicReference P = new AtomicReference();
private final AtomicReference Q = new AtomicReference();
private final AtomicReference R = new AtomicReference();
private final AtomicReference S = new AtomicReference();
private final AtomicReference T = new AtomicReference();
private final AtomicReference U = new AtomicReference();
private final AtomicReference V = new AtomicReference();
private final AtomicReference W = new AtomicReference();
private final AtomicReference X = new AtomicReference();
private final AtomicReference Y = new AtomicReference();
private final AtomicReference Z = new AtomicReference();
private final AtomicReference a0 = new AtomicReference();
private final AtomicReference b0 = new AtomicReference();
private final AtomicReference c0 = new AtomicReference();
private final AtomicReference d0 = new AtomicReference();
private final Object f0 = new Object();
private final AtomicBoolean g0 = new AtomicBoolean(true);
private final AtomicBoolean h0 = new AtomicBoolean();
private boolean j0 = false;
private boolean k0 = false;
private boolean l0 = false;
private int m0 = 0;
private final Object p0 = new Object();
private AppLovinSdkConfiguration q0 = new SdkConfigurationImpl(null, this);
private final w4 t0 = new f6(this, true, "scheduleAdLoadIntegrationError", new Runnable() {
@Override
public final void run() {
j.this.D0();
}
});
private final w4 u0 = new f6(this, true, "sdkInit", new Runnable() {
@Override
public final void run() {
j.this.E0();
}
});
public class a implements h5.b {
public a() {
}
public void a(JSONObject jSONObject) {
boolean z = jSONObject != null && jSONObject.length() > 0;
j.this.c(jSONObject);
x.b(j.this);
n0.a(jSONObject, z, j.this);
j.this.N().a(JsonUtils.getBoolean(jSONObject, "smd", Boolean.FALSE).booleanValue(), JsonUtils.getInt(jSONObject, "smd_delay_sec", 2));
j.this.A().b();
j jVar = j.this;
jVar.e0 = jVar.a(jSONObject);
if (z) {
List<String> explode = CollectionUtils.explode(JsonUtils.getString(jSONObject, "eaaui", ""));
j jVar2 = j.this;
jVar2.q0 = new SdkConfigurationImpl(explode, jVar2);
}
j.this.l0().a(jSONObject);
j.this.b(jSONObject);
l2.b(((Boolean) j.this.a(l4.K5)).booleanValue());
l2.a(((Boolean) j.this.a(l4.L5)).booleanValue());
j.this.J0();
if (!((Boolean) j.this.a(l4.Q2)).booleanValue() || z || !n0.a(j.n())) {
j.this.H0();
return;
}
j.this.I();
if (n.a()) {
j.this.I().d("AppLovinSdk", "SDK initialized with no internet connection - listening for connection");
}
j.this.M0();
}
}
public class b implements p0.c {
public b() {
}
public void a(p0.b bVar) {
j.this.I();
if (n.a()) {
j.this.I().a("AppLovinSdk", "Terms and Privacy Policy flow completed with status: " + bVar);
}
if (!bVar.c()) {
j.this.c("Initializing SDK in MAX environment...");
return;
}
j.this.I();
if (n.a()) {
j.this.I().a("AppLovinSdk", "Re-initializing SDK with the updated privacy settings...");
}
j.this.L0();
j.this.K0();
}
}
public class c implements h5.b {
public c() {
}
public void a(JSONObject jSONObject) {
if (jSONObject != null && jSONObject.length() > 0) {
j.this.c(jSONObject);
}
j.this.e.set(false);
j.this.H0();
}
}
public class d implements n3.a {
final n3 a;
public d(n3 n3Var) {
this.a = n3Var;
}
@Override
public void a() {
j.this.I();
if (n.a()) {
j.this.I().d("AppLovinSdk", "Connected to internet - re-initializing SDK");
}
synchronized (j.this.f0) {
if (!j.this.i0) {
j.this.L0();
}
}
this.a.b(this);
}
@Override
public void b() {
}
}
static {
try {
AppLovinSdkUtils.runOnUiThread(new Runnable() {
@Override
public final void run() {
z6.c();
}
});
z0 = true;
} catch (Throwable unused) {
z0 = false;
}
}
public j(AppLovinSdkSettings appLovinSdkSettings, Context context) {
this.i0 = false;
v0 = this;
this.f = appLovinSdkSettings;
this.c = System.currentTimeMillis();
this.i0 = true;
if (!y0()) {
throw new RuntimeException("As of version 12.0.0, the AppLovin MAX SDK requires Java 8. For more information visit our docs: https://developers.applovin.com/en/android/overview/integration");
}
w0 = context.getApplicationContext();
if (context instanceof Activity) {
this.b = new WeakReference((Activity) context);
}
}
public void B0() {
if (j0().d()) {
return;
}
I();
if (n.a()) {
I().a("AppLovinSdk", "Timing out adapters init...");
}
j0().e();
F0();
}
public void C0() {
r5 j0 = j0();
int i = this.m0 + 1;
this.m0 = i;
j0.a((w4) new h5(i, this, new c()), r5.b.CORE);
}
public void D0() {
if (z0()) {
e2.b(this);
}
}
public void E0() {
synchronized (this.f0) {
boolean a2 = n0.a(n());
if (!z0()) {
I();
if (n.a()) {
I().a("AppLovinSdk", "non-MAX mediation detected, mediation provider is: " + O());
}
}
if (!((Boolean) a(l4.R2)).booleanValue() || a2) {
L0();
}
if (((Boolean) a(l4.Q2)).booleanValue() && !a2) {
I();
if (n.a()) {
I().d("AppLovinSdk", "SDK initialized with no internet connection - listening for connection");
}
M0();
}
}
}
private q G0() {
if (!e4.f(w0)) {
return null;
}
try {
return new q(this);
} catch (Throwable th) {
n.b("AppLovinSdk", "Failed to initialize Privacy Sandbox Service", th);
return null;
}
}
public void H0() {
Long l = (Long) a(l4.Z2);
if (l.longValue() >= 0 && this.e.compareAndSet(false, true)) {
t7.a(l.longValue(), false, this, new Runnable() {
@Override
public final void run() {
j.this.C0();
}
});
}
}
public void J0() {
if (!z0()) {
c("Initializing SDK in non-MAX environment...");
return;
}
if (!this.h0.compareAndSet(false, true)) {
c("Consent flow is already shown. Initializing SDK in MAX environment...");
} else if (!v().j()) {
c("Consent flow is not enabled. Initializing SDK in MAX environment...");
} else {
v().a(n0(), new b());
}
}
public void M0() {
n3 V = V();
V.a(new d(V));
}
private Map P() {
try {
return JsonUtils.toStringMap(new JSONObject((String) a(l4.S3)));
} catch (JSONException unused) {
return Collections.emptyMap();
}
}
public static long m() {
return y0;
}
public static Context n() {
return w0;
}
private void t0() {
Context context = w0;
n I = I();
o4 i0 = i0();
p0 v = v();
a(context);
f0();
j();
o();
V();
L().a(MaxAdapter.InitializationStatus.INITIALIZING);
NativeCrashReporter.a(this);
String str = this.a;
if (str == null || str.length() != 86) {
n.h("AppLovinSdk", "SDK key provided is invalid (" + this.a + "). Expected length: 86 characters.\n\nStack trace:\n" + Log.getStackTraceString(new Throwable()));
}
if (v.l()) {
String str2 = "Terms Flow has been replaced. " + v.g();
if (z6.c(this)) {
throw new IllegalStateException(str2);
}
n.h("AppLovinSdk", str2);
}
if (z6.i()) {
n.h("AppLovinSdk", "Failed to find class for name: com.applovin.sdk.AppLovinSdk. Please ensure proguard rules have not been omitted from the build.");
}
if (!z6.b(this)) {
n.h("AppLovinSdk", "Detected non-Android core JSON library. Please double-check that none of your third party libraries include custom implementation of org.json.JSONObject.");
}
if (z6.k(context)) {
this.f.setVerboseLogging(true);
}
h0().a(l4.k, Boolean.valueOf(this.f.isVerboseLoggingEnabled()));
l3.d(this);
SharedPreferences defaultSharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);
n4 n4Var = n4.c;
if (TextUtils.isEmpty((String) i0.a(n4Var, (Object) null, defaultSharedPreferences))) {
this.k0 = true;
i0.b(n4Var, Boolean.toString(true), defaultSharedPreferences);
} else {
i0.b(n4Var, Boolean.toString(false), defaultSharedPreferences);
}
n4 n4Var2 = n4.d;
if (((Boolean) i0.a(n4Var2, Boolean.FALSE)).booleanValue()) {
if (n.a()) {
I.a("AppLovinSdk", "Initializing SDK for non-maiden launch");
}
this.l0 = true;
} else {
if (n.a()) {
I.a("AppLovinSdk", "Initializing SDK for maiden launch");
}
i0.b(n4Var2, Boolean.TRUE);
i0.b(n4.o, Boolean.valueOf(v.j()));
}
n4 n4Var3 = n4.e;
String str3 = (String) i0.a(n4Var3, null);
if (StringUtils.isValidString(str3)) {
if (AppLovinSdk.VERSION_CODE > z6.g(str3)) {
i0.b(n4Var3, AppLovinSdk.VERSION);
}
} else {
i0.b(n4Var3, AppLovinSdk.VERSION);
}
o0().d(y1.e, CollectionUtils.map("details", "isInitProviderContextSet=" + x0));
}
public static boolean y0() {
return z0;
}
public k1 A() {
return this.q;
}
public boolean A0() {
return z6.a("com.unity3d.player.UnityPlayerActivity");
}
public EventServiceImpl B() {
Object obj = this.k.get();
if (obj == null) {
synchronized (this.k) {
obj = this.k.get();
if (obj == null) {
obj = new EventServiceImpl(this);
this.k.set(obj);
}
}
}
if (obj == this.k) {
obj = null;
}
return (EventServiceImpl) obj;
}
public l C() {
Object obj = this.D.get();
if (obj == null) {
synchronized (this.D) {
obj = this.D.get();
if (obj == null) {
obj = new l(this);
this.D.set(obj);
}
}
}
if (obj == this.D) {
obj = null;
}
return (l) obj;
}
public m D() {
Object obj = this.F.get();
if (obj == null) {
synchronized (this.F) {
obj = this.F.get();
if (obj == null) {
obj = new m(this);
this.F.set(obj);
}
}
}
if (obj == this.F) {
obj = null;
}
return (m) obj;
}
public w1 E() {
Object obj = this.v.get();
if (obj == null) {
synchronized (this.v) {
obj = this.v.get();
if (obj == null) {
obj = new w1(this);
this.v.set(obj);
}
}
}
if (obj == this.v) {
obj = null;
}
return (w1) obj;
}
public Activity F() {
WeakReference weakReference;
if (!((Boolean) a(l4.f4)).booleanValue() || (weakReference = this.b) == null) {
return null;
}
return (Activity) weakReference.get();
}
public void F0() {
final AppLovinSdk.SdkInitializationListener sdkInitializationListener;
if (v().i() || (sdkInitializationListener = this.r0) == null) {
return;
}
if (u0()) {
this.r0 = null;
this.s0 = null;
L().a(MaxAdapter.InitializationStatus.INITIALIZED_SUCCESS);
} else {
if (this.s0 == sdkInitializationListener) {
return;
}
L().a(MaxAdapter.InitializationStatus.INITIALIZED_FAILURE);
if (((Boolean) a(l4.p)).booleanValue()) {
this.r0 = null;
} else {
this.s0 = sdkInitializationListener;
}
}
AppLovinSdkUtils.runOnUiThreadDelayed(new Runnable() {
@Override
public final void run() {
j.this.b(sdkInitializationListener);
}
}, Math.max(0L, ((Long) a(l4.q)).longValue()));
}
public AppLovinSdkInitializationConfiguration G() {
return this.o0;
}
public long H() {
return this.c;
}
public n I() {
return this.n;
}
public void I0() {
if (StringUtils.isValidString(this.h)) {
return;
}
this.h = "max";
}
public r2 J() {
return this.p;
}
public com.applovin.impl.mediation.d K() {
Object obj = this.c0.get();
if (obj == null) {
synchronized (this.c0) {
obj = this.c0.get();
if (obj == null) {
obj = new com.applovin.impl.mediation.d(this);
this.c0.set(obj);
}
}
}
if (obj == this.c0) {
obj = null;
}
return (com.applovin.impl.mediation.d) obj;
}
public void K0() {
r().a();
}
public com.applovin.impl.mediation.e L() {
Object obj = this.X.get();
if (obj == null) {
synchronized (this.X) {
obj = this.X.get();
if (obj == null) {
obj = new com.applovin.impl.mediation.e(this);
this.X.set(obj);
}
}
}
if (obj == this.X) {
obj = null;
}
return (com.applovin.impl.mediation.e) obj;
}
public void L0() {
synchronized (this.f0) {
this.i0 = true;
j0().f();
d();
}
}
public com.applovin.impl.mediation.f M() {
Object obj = this.W.get();
if (obj == null) {
synchronized (this.W) {
obj = this.W.get();
if (obj == null) {
obj = new com.applovin.impl.mediation.f(this);
this.W.set(obj);
}
}
}
if (obj == this.W) {
obj = null;
}
return (com.applovin.impl.mediation.f) obj;
}
public f3 N() {
Object obj = this.a0.get();
if (obj == null) {
synchronized (this.a0) {
obj = this.a0.get();
if (obj == null) {
obj = new f3(this);
this.a0.set(obj);
}
}
}
if (obj == this.a0) {
obj = null;
}
return (f3) obj;
}
public void N0() {
n.h("AppLovinSdk", "Resetting SDK state...");
w1 E = E();
v1 v1Var = v1.l;
long b2 = E.b(v1Var);
h0().a();
h0().e();
E().a();
E().b(v1Var, b2 + 1);
if (this.g0.compareAndSet(true, false)) {
L0();
} else {
this.g0.set(true);
}
}
public String O() {
return this.h;
}
public void O0() {
if (StringUtils.isValidString(this.n0)) {
return;
}
this.n0 = "max";
I();
if (n.a()) {
I().a("AppLovinSdk", "Detected mediation provider: MAX");
}
}
public void P0() {
w().n();
}
public MediationServiceImpl Q() {
Object obj = this.Y.get();
if (obj == null) {
synchronized (this.Y) {
obj = this.Y.get();
if (obj == null) {
obj = new MediationServiceImpl(this);
this.Y.set(obj);
}
}
}
if (obj == this.Y) {
obj = null;
}
return (MediationServiceImpl) obj;
}
public void Q0() {
a((Map) null);
}
public j3 R() {
Object obj = this.w.get();
if (obj == null) {
synchronized (this.w) {
obj = this.w.get();
if (obj == null) {
obj = new j3(this);
this.w.set(obj);
}
}
}
if (obj == this.w) {
obj = null;
}
return (j3) obj;
}
public void R0() {
if ("admob".equalsIgnoreCase(this.h) && ((Boolean) a(l4.w3)).booleanValue()) {
String str = (String) a(l4.v3);
if (TextUtils.isEmpty(str)) {
return;
}
StringBuilder sb = new StringBuilder();
String str2 = AppLovinSdk.VERSION;
sb.append(str2);
sb.append(".");
if (str.startsWith(sb.toString())) {
return;
}
final String str3 = "Mismatched AdMob adapter (" + str + ") and AppLovin SDK (" + str2 + ") versions detected, which may cause compatibility issues.";
n.h("AppLovinSdk", str3);
AppLovinSdkUtils.runOnUiThread(true, new Runnable() {
@Override
public final void run() {
j.this.b(str3);
}
});
}
}
public k3 S() {
Object obj = this.Z.get();
if (obj == null) {
synchronized (this.Z) {
obj = this.Z.get();
if (obj == null) {
obj = new k3();
this.Z.set(obj);
}
}
}
if (obj == this.Z) {
obj = null;
}
return (k3) obj;
}
public o T() {
Object obj = this.b0.get();
if (obj == null) {
synchronized (this.b0) {
obj = this.b0.get();
if (obj == null) {
obj = new o(this);
this.b0.set(obj);
}
}
}
if (obj == this.b0) {
obj = null;
}
return (o) obj;
}
public AppLovinNativeAdService U() {
Object obj = this.j.get();
if (obj == null) {
synchronized (this.j) {
obj = this.j.get();
if (obj == null) {
obj = new AppLovinNativeAdService(this);
this.j.set(obj);
}
}
}
if (obj == this.j) {
obj = null;
}
return (AppLovinNativeAdService) obj;
}
public n3 V() {
Object obj = this.I.get();
if (obj == null) {
synchronized (this.I) {
obj = this.I.get();
if (obj == null) {
obj = new n3(n());
this.I.set(obj);
}
}
}
if (obj == this.I) {
obj = null;
}
return (n3) obj;
}
public w3 W() {
Object obj = this.P.get();
if (obj == null) {
synchronized (this.P) {
obj = this.P.get();
if (obj == null) {
obj = new w3(this);
this.P.set(obj);
}
}
}
if (obj == this.P) {
obj = null;
}
return (w3) obj;
}
public com.applovin.impl.sdk.network.b X() {
Object obj = this.U.get();
if (obj == null) {
synchronized (this.U) {
obj = this.U.get();
if (obj == null) {
obj = new com.applovin.impl.sdk.network.b(this);
this.U.set(obj);
}
}
}
if (obj == this.U) {
obj = null;
}
return (com.applovin.impl.sdk.network.b) obj;
}
public PostbackServiceImpl Y() {
Object obj = this.T.get();
if (obj == null) {
synchronized (this.T) {
obj = this.T.get();
if (obj == null) {
obj = new PostbackServiceImpl(this);
this.T.set(obj);
}
}
}
if (obj == this.T) {
obj = null;
}
return (PostbackServiceImpl) obj;
}
public q Z() {
Object obj = this.y.get();
if (obj == null) {
synchronized (this.y) {
obj = this.y.get();
if (obj == null) {
obj = G0();
if (obj == null) {
obj = this.y;
}
this.y.set(obj);
}
}
}
if (obj == this.y) {
obj = null;
}
return (q) obj;
}
public String a0() {
return p0().a();
}
public String b0() {
return this.a;
}
public MaxSegmentCollectionImpl c0() {
return (MaxSegmentCollectionImpl) this.g;
}
public Map d0() {
MaxSegmentCollectionImpl c0 = c0();
if (c0 == null) {
return null;
}
return c0.getJsonData();
}
public k4 e0() {
Object obj = this.K.get();
if (obj == null) {
synchronized (this.K) {
obj = this.K.get();
if (obj == null) {
obj = new k4(this);
this.K.set(obj);
}
}
}
if (obj == this.K) {
obj = null;
}
return (k4) obj;
}
public SessionTracker f0() {
Object obj = this.E.get();
if (obj == null) {
synchronized (this.E) {
obj = this.E.get();
if (obj == null) {
obj = new SessionTracker(this);
this.E.set(obj);
}
}
}
if (obj == this.E) {
obj = null;
}
return (SessionTracker) obj;
}
public com.applovin.impl.f g() {
return this.o;
}
public AppLovinSdkSettings g0() {
return this.f;
}
public com.applovin.impl.sdk.d h() {
Object obj = this.S.get();
if (obj == null) {
synchronized (this.S) {
obj = this.S.get();
if (obj == null) {
obj = new com.applovin.impl.sdk.d(this);
this.S.set(obj);
}
}
}
if (obj == this.S) {
obj = null;
}
return (com.applovin.impl.sdk.d) obj;
}
public m4 h0() {
Object obj = this.t.get();
if (obj == null) {
synchronized (this.t) {
obj = this.t.get();
if (obj == null) {
obj = new m4(this);
this.t.set(obj);
}
}
}
if (obj == this.t) {
obj = null;
}
return (m4) obj;
}
public e i() {
Object obj = this.B.get();
if (obj == null) {
synchronized (this.B) {
obj = this.B.get();
if (obj == null) {
obj = new e(this);
this.B.set(obj);
}
}
}
if (obj == this.B) {
obj = null;
}
return (e) obj;
}
public o4 i0() {
Object obj = this.z.get();
if (obj == null) {
synchronized (this.z) {
obj = this.z.get();
if (obj == null) {
obj = new o4(this);
this.z.set(obj);
}
}
}
if (obj == this.z) {
obj = null;
}
return (o4) obj;
}
public com.applovin.impl.h j() {
Object obj = this.V.get();
if (obj == null) {
synchronized (this.V) {
obj = this.V.get();
if (obj == null) {
obj = new com.applovin.impl.h(this);
this.V.set(obj);
}
}
}
if (obj == this.V) {
obj = null;
}
return (com.applovin.impl.h) obj;
}
public r5 j0() {
Object obj = this.s.get();
if (obj == null) {
synchronized (this.s) {
obj = this.s.get();
if (obj == null) {
obj = new r5(this);
this.s.set(obj);
}
}
}
if (obj == this.s) {
obj = null;
}
return (r5) obj;
}
public AppLovinAdServiceImpl k() {
Object obj = this.i.get();
if (obj == null) {
synchronized (this.i) {
obj = this.i.get();
if (obj == null) {
obj = new AppLovinAdServiceImpl(this);
this.i.set(obj);
}
}
}
if (obj == this.i) {
obj = null;
}
return (AppLovinAdServiceImpl) obj;
}
public m6 k0() {
Object obj = this.N.get();
if (obj == null) {
synchronized (this.N) {
obj = this.N.get();
if (obj == null) {
obj = new m6(this);
this.N.set(obj);
}
}
}
if (obj == this.N) {
obj = null;
}
return (m6) obj;
}
public g l() {
Object obj = this.G.get();
if (obj == null) {
synchronized (this.G) {
obj = this.G.get();
if (obj == null) {
obj = new g(this);
this.G.set(obj);
}
}
}
if (obj == this.G) {
obj = null;
}
return (g) obj;
}
public s6 l0() {
Object obj = this.d0.get();
if (obj == null) {
synchronized (this.d0) {
obj = this.d0.get();
if (obj == null) {
obj = new s6(this);
this.d0.set(obj);
}
}
}
if (obj == this.d0) {
obj = null;
}
return (s6) obj;
}
public long m0() {
if (this.d == 0) {
return -1L;
}
return System.currentTimeMillis() - this.d;
}
public Activity n0() {
Activity b2 = a(n()).b();
return b2 != null ? b2 : F();
}
public ArrayService o() {
Object obj = this.Q.get();
if (obj == null) {
synchronized (this.Q) {
obj = this.Q.get();
if (obj == null) {
obj = new ArrayService(this);
this.Q.set(obj);
}
}
}
if (obj == this.Q) {
obj = null;
}
return (ArrayService) obj;
}
public x6 o0() {
return this.r;
}
public h p() {
Object obj = this.L.get();
if (obj == null) {
synchronized (this.L) {
obj = this.L.get();
if (obj == null) {
obj = new h(this);
this.L.set(obj);
}
}
}
if (obj == this.L) {
obj = null;
}
return (h) obj;
}
public y6 p0() {
Object obj = this.A.get();
if (obj == null) {
synchronized (this.A) {
obj = this.A.get();
if (obj == null) {
obj = new y6(this);
this.A.set(obj);
}
}
}
if (obj == this.A) {
obj = null;
}
return (y6) obj;
}
public CmpServiceImpl q() {
Object obj = this.l.get();
if (obj == null) {
synchronized (this.l) {
obj = this.l.get();
if (obj == null) {
obj = new CmpServiceImpl(this);
this.l.set(obj);
}
}
}
if (obj == this.l) {
obj = null;
}
return (CmpServiceImpl) obj;
}
public x7 q0() {
Object obj = this.H.get();
if (obj == null) {
synchronized (this.H) {
obj = this.H.get();
if (obj == null) {
obj = new x7(this);
this.H.set(obj);
}
}
}
if (obj == this.H) {
obj = null;
}
return (x7) obj;
}
public i r() {
Object obj = this.J.get();
if (obj == null) {
synchronized (this.J) {
obj = this.J.get();
if (obj == null) {
obj = new i(this);
this.J.set(obj);
}
}
}
if (obj == this.J) {
obj = null;
}
return (i) obj;
}
public AppLovinSdk r0() {
return this.m;
}
public String s() {
return p0().b();
}
public boolean s0() {
return this.l0;
}
public AppLovinSdkConfiguration t() {
return this.q0;
}
public String toString() {
return "CoreSdk{sdkKey='" + this.a + "', enabled=" + this.j0 + ", isFirstSession=" + this.k0 + '}';
}
public m0 u() {
Object obj = this.u.get();
if (obj == null) {
synchronized (this.u) {
obj = this.u.get();
if (obj == null) {
obj = new m0(this);
this.u.set(obj);
}
}
}
if (obj == this.u) {
obj = null;
}
return (m0) obj;
}
public boolean u0() {
boolean z;
synchronized (this.f0) {
z = this.j0;
}
return z;
}
public p0 v() {
Object obj = this.M.get();
if (obj == null) {
synchronized (this.M) {
obj = this.M.get();
if (obj == null) {
obj = new p0(this);
this.M.set(obj);
}
}
}
if (obj == this.M) {
obj = null;
}
return (p0) obj;
}
public boolean v0() {
return this.k0;
}
public z0 w() {
Object obj = this.O.get();
if (obj == null) {
synchronized (this.O) {
obj = this.O.get();
if (obj == null) {
obj = new z0(this);
this.O.set(obj);
}
}
}
if (obj == this.O) {
obj = null;
}
return (z0) obj;
}
public boolean w0() {
boolean z;
synchronized (this.p0) {
z = this.o0 != null;
}
return z;
}
public a1 x() {
Object obj = this.R.get();
if (obj == null) {
synchronized (this.R) {
obj = this.R.get();
if (obj == null) {
obj = new a1(this);
this.R.set(obj);
}
}
}
if (obj == this.R) {
obj = null;
}
return (a1) obj;
}
public boolean x0() {
boolean z;
synchronized (this.f0) {
z = this.i0;
}
return z;
}
public k y() {
Object obj = this.x.get();
if (obj == null) {
synchronized (this.x) {
obj = this.x.get();
if (obj == null) {
obj = new k(this);
this.x.set(obj);
}
}
}
if (obj == this.x) {
obj = null;
}
return (k) obj;
}
public String z() {
return this.n0;
}
public boolean z0() {
return StringUtils.containsIgnoreCase(O(), "max");
}
private void d() {
r5 j0 = j0();
int i = this.m0 + 1;
this.m0 = i;
j0.a((w4) new h5(i, this, new a()), r5.b.CORE);
}
public com.applovin.impl.c e() {
return a(w0);
}
public com.applovin.impl.sdk.a f() {
Object obj = this.C.get();
if (obj == null) {
synchronized (this.C) {
obj = this.C.get();
if (obj == null) {
obj = new com.applovin.impl.sdk.a(this);
this.C.set(obj);
}
}
}
if (obj == this.C) {
obj = null;
}
return (com.applovin.impl.sdk.a) obj;
}
public static void b(Context context) {
if (context == null) {
return;
}
w0 = context.getApplicationContext();
x0 = true;
}
public void c(JSONObject jSONObject) {
this.d = System.currentTimeMillis();
n0.c(jSONObject, this);
n0.b(jSONObject, this);
n0.a(jSONObject, this);
b3.f(jSONObject, this);
b3.d(jSONObject, this);
b3.e(jSONObject, this);
b3.g(jSONObject, this);
}
public void a(AppLovinSdkInitializationConfiguration appLovinSdkInitializationConfiguration) {
t0();
this.f.attachAppLovinSdk(this);
String pluginVersion = appLovinSdkInitializationConfiguration.getPluginVersion();
if (pluginVersion != null) {
n.g("AppLovinSdk", "Setting plugin version: " + pluginVersion);
h0().a(l4.v3, pluginVersion);
}
if (appLovinSdkInitializationConfiguration.isExceptionHandlerEnabled() && ((Boolean) a(l4.s)).booleanValue()) {
AppLovinExceptionHandler.shared().addSdk(this);
AppLovinExceptionHandler.shared().enable();
}
r5 j0 = j0();
w4 w4Var = this.t0;
r5.b bVar = r5.b.CORE;
j0.a(w4Var, bVar);
j0().a(this.u0, bVar);
}
public void a(AppLovinSdk appLovinSdk) {
this.m = appLovinSdk;
}
public static String a(String str) {
return a(str, (List) null);
}
public static String a(int i) {
return a(i, (List) null);
}
public static String a(String str, List list) {
if (TextUtils.isEmpty(str)) {
return "";
}
Context n = n();
return a(n.getResources().getIdentifier(str, "string", n.getPackageName()), list);
}
public void c(String str) {
I();
if (n.a()) {
I().a("AppLovinSdk", str);
}
j0().a(new q5(this));
}
public static String a(int i, List list) {
String string = n().getResources().getString(i);
return list != null ? String.format(string, list.toArray()) : string;
}
public void c() {
synchronized (this.f0) {
if (!this.i0 && !this.j0) {
L0();
}
}
}
public void b(JSONObject jSONObject) {
Iterator it = JsonUtils.getList(jSONObject, "error_messages", Collections.emptyList()).iterator();
while (it.hasNext()) {
n.h("AppLovinSdk", (String) it.next());
}
}
public static com.applovin.impl.c a(Context context) {
if (A0 == null) {
synchronized (B0) {
if (A0 == null) {
A0 = new com.applovin.impl.c(context);
}
}
}
return A0;
}
public void b(String str) {
if (!z6.c(this)) {
HashMap hashMap = new HashMap();
hashMap.put("details", "admob");
hashMap.put("error_message", str);
A().a(y1.o0, "adapterVersionMismatch", hashMap);
return;
}
throw new IllegalStateException(str);
}
public List c(l4 l4Var) {
return h0().c(l4Var);
}
public void c(n4 n4Var) {
i0().b(n4Var);
}
public void a(final AppLovinSdkInitializationConfiguration appLovinSdkInitializationConfiguration, final AppLovinSdk.SdkInitializationListener sdkInitializationListener) {
synchronized (this.p0) {
if (this.o0 != null) {
n.h("AppLovinSdk", "AppLovin SDK already initialized with configuration: " + this.o0 + ". Ignoring the provided initialization configuration.");
if (!u0() || sdkInitializationListener == null) {
return;
}
AppLovinSdkUtils.runOnUiThread(new Runnable() {
@Override
public final void run() {
j.this.a(sdkInitializationListener);
}
});
return;
}
this.o0 = appLovinSdkInitializationConfiguration;
this.r0 = sdkInitializationListener;
this.a = appLovinSdkInitializationConfiguration.getSdkKey();
this.h = appLovinSdkInitializationConfiguration.getMediationProvider();
this.g = appLovinSdkInitializationConfiguration.getSegmentCollection();
z6.a(new Runnable() {
@Override
public final void run() {
j.this.a(appLovinSdkInitializationConfiguration);
}
});
}
}
public void b(AppLovinSdk.SdkInitializationListener sdkInitializationListener) {
I();
if (n.a()) {
I().a("AppLovinSdk", "Calling back publisher's initialization completion handler...");
}
sdkInitializationListener.onSdkInitialized(this.q0);
}
public List b(l4 l4Var) {
return h0().b(l4Var);
}
public void b(n4 n4Var, Object obj) {
i0().b(n4Var, obj);
}
public Object b(n4 n4Var) {
return i0().a(n4Var);
}
public java.lang.String b() {
throw new UnsupportedOperationException("Method not decompiled: com.applovin.impl.sdk.j.b():java.lang.String");
}
public void a(AppLovinSdk.SdkInitializationListener sdkInitializationListener) {
sdkInitializationListener.onSdkInitialized(this.q0);
}
public List a(JSONObject jSONObject) {
List asList = Arrays.asList(JsonUtils.getString(jSONObject, "eaf", "").split(","));
ArrayList arrayList = new ArrayList(asList.size());
Iterator it = asList.iterator();
while (it.hasNext()) {
MaxAdFormat formatFromString = MaxAdFormat.formatFromString((String) it.next());
if (formatFromString != null) {
arrayList.add(formatFromString);
}
}
return arrayList;
}
public void a(boolean z) {
synchronized (this.f0) {
this.i0 = false;
this.j0 = z;
}
if (z) {
List a2 = l3.a(this);
if (a2.isEmpty()) {
j0().e();
F0();
return;
}
Long l = (Long) a(g3.w6);
f6 f6Var = new f6(this, true, "timeoutInitAdapters", new Runnable() {
@Override
public final void run() {
j.this.B0();
}
});
I();
if (n.a()) {
I().a("AppLovinSdk", "Waiting for required adapters to init: " + a2 + " - timing out in " + l + "ms...");
}
j0().a(f6Var, r5.b.TIMEOUT, l.longValue(), true);
}
}
public void a(a3 a3Var) {
if (j0().d()) {
return;
}
List a2 = l3.a(this);
if (a2.size() <= 0 || !L().a().containsAll(a2)) {
return;
}
I();
if (n.a()) {
I().a("AppLovinSdk", "All required adapters initialized");
}
j0().e();
F0();
}
public boolean a(MaxAdFormat maxAdFormat) {
List list = this.e0;
return (list == null || list.size() <= 0 || this.e0.contains(maxAdFormat)) ? false : true;
}
public void a() {
String str = (String) i0().a(n4.e, null);
if (StringUtils.isValidString(str)) {
if (AppLovinSdk.VERSION_CODE < z6.g(str)) {
n.h("AppLovinSdk", "Current version (" + AppLovinSdk.VERSION + ") is older than earlier installed version (" + str + "), which may cause compatibility issues.");
}
}
}
public Object a(l4 l4Var) {
return h0().a(l4Var);
}
public boolean a(l4 l4Var, MaxAdFormat maxAdFormat) {
return b(l4Var).contains(maxAdFormat);
}
public void a(Map map) {
N().a(map);
}
public void a(String str, Object obj, SharedPreferences.Editor editor) {
i0().a(str, obj, editor);
}
public Object a(n4 n4Var) {
return a(n4Var, (Object) null);
}
public Object a(n4 n4Var, Object obj) {
return i0().a(n4Var, obj);
}
public Object a(String str, Object obj, Class cls, SharedPreferences sharedPreferences) {
return o4.a(str, obj, cls, sharedPreferences);
}
public void a(SharedPreferences sharedPreferences) {
i0().a(sharedPreferences);
}
}