导航菜单

页面标题

页面副标题

CallApp v2.226 - j.java 源代码

正在查看: CallApp v2.226 应用的 j.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.applovin.impl.sdk;

import a1.d0;
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.amazonaws.services.s3.model.InstructionFileId;
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.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.AppLovinMediationProvider;
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.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 f10364v0;

    protected static Context f10365w0;

    private static boolean f10366x0;

    private static final boolean f10368z0;

    private String f10369a;

    private WeakReference f10371b;

    private final long f10373c;

    private long f10375d;

    private List f10378e0;

    private final AppLovinSdkSettings f10379f;

    private MaxSegmentCollection f10381g;

    private String f10383h;

    private boolean f10386i0;

    private volatile AppLovinSdk f10393m;

    private String f10396n0;

    private AppLovinSdkInitializationConfiguration f10398o0;

    private AppLovinSdk.SdkInitializationListener f10404r0;

    private AppLovinSdk.SdkInitializationListener f10406s0;
    private static final Object B0 = new Object();

    private static final long f10367y0 = System.currentTimeMillis();

    private final AtomicBoolean f10377e = new AtomicBoolean();

    private final AtomicReference f10385i = new AtomicReference();

    private final AtomicReference f10387j = new AtomicReference();

    private final AtomicReference f10389k = new AtomicReference();

    private final AtomicReference f10391l = new AtomicReference();

    private final n f10395n = new n(this);

    private final com.applovin.impl.f f10397o = new com.applovin.impl.f(this);

    private final r2 f10399p = new r2(this);

    private final k1 f10401q = new k1(this);

    private final x6 f10403r = new x6(this);

    private final AtomicReference f10405s = new AtomicReference();

    private final AtomicReference f10407t = new AtomicReference();

    private final AtomicReference f10409u = new AtomicReference();

    private final AtomicReference f10411v = new AtomicReference();

    private final AtomicReference f10412w = new AtomicReference();

    private final AtomicReference f10413x = new AtomicReference();

    private final AtomicReference f10414y = new AtomicReference();

    private final AtomicReference f10415z = 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 f10370a0 = new AtomicReference();

    private final AtomicReference f10372b0 = new AtomicReference();

    private final AtomicReference f10374c0 = new AtomicReference();

    private final AtomicReference f10376d0 = new AtomicReference();

    private final Object f10380f0 = new Object();

    private final AtomicBoolean f10382g0 = new AtomicBoolean(true);

    private final AtomicBoolean f10384h0 = new AtomicBoolean();

    private boolean f10388j0 = false;

    private boolean f10390k0 = false;

    private boolean f10392l0 = false;

    private int f10394m0 = 0;

    private final Object f10400p0 = new Object();

    private AppLovinSdkConfiguration f10402q0 = new SdkConfigurationImpl(null, this);

    private final w4 f10408t0 = new f6(this, true, "scheduleAdLoadIntegrationError", new w(1, this));

    private final w4 f10410u0 = new f6(this, true, "sdkInit", new w(2, this));

    public class a implements h5.b {
        public a() {
        }

        @Override
        public void a(JSONObject jSONObject) {
            boolean z8 = jSONObject != null && jSONObject.length() > 0;
            j.this.c(jSONObject);
            com.applovin.impl.x.b(j.this);
            n0.a(jSONObject, z8, 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.f10378e0 = jVar.a(jSONObject);
            if (z8) {
                List<String> explode = CollectionUtils.explode(JsonUtils.getString(jSONObject, "eaaui", ""));
                j jVar2 = j.this;
                jVar2.f10402q0 = 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() || z8 || !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() {
        }

        @Override
        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() {
        }

        @Override
        public void a(JSONObject jSONObject) {
            if (jSONObject != null && jSONObject.length() > 0) {
                j.this.c(jSONObject);
            }
            j.this.f10377e.set(false);
            j.this.H0();
        }
    }

    public class d implements n3.a {

        final n3 f10419a;

        public d(n3 n3Var) {
            this.f10419a = 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.f10380f0) {
                try {
                    if (!j.this.f10386i0) {
                        j.this.L0();
                    }
                } catch (Throwable th) {
                    throw th;
                }
            }
            this.f10419a.b(this);
        }

        @Override
        public void b() {
        }
    }

    static {
        try {
            AppLovinSdkUtils.runOnUiThread(new androidx.media3.ui.y(2));
            f10368z0 = true;
        } catch (Throwable unused) {
            f10368z0 = false;
        }
    }

    public j(AppLovinSdkSettings appLovinSdkSettings, Context context) {
        this.f10386i0 = false;
        f10364v0 = this;
        this.f10379f = appLovinSdkSettings;
        this.f10373c = System.currentTimeMillis();
        this.f10386i0 = 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");
        }
        f10365w0 = context.getApplicationContext();
        if (context instanceof Activity) {
            this.f10371b = 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 j02 = j0();
        int i8 = this.f10394m0 + 1;
        this.f10394m0 = i8;
        j02.a((w4) new h5(i8, this, new c()), r5.b.CORE);
    }

    public void D0() {
        if (z0()) {
            e2.b(this);
        }
    }

    public void E0() {
        synchronized (this.f10380f0) {
            try {
                boolean a8 = 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() || a8) {
                    L0();
                }
                if (((Boolean) a(l4.Q2)).booleanValue() && !a8) {
                    I();
                    if (n.a()) {
                        I().d("AppLovinSdk", "SDK initialized with no internet connection - listening for connection");
                    }
                    M0();
                }
            } catch (Throwable th) {
                throw th;
            }
        }
    }

    private q G0() {
        if (!e4.f(f10365w0)) {
            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 l8 = (Long) a(l4.Z2);
        if (l8.longValue() >= 0 && this.f10377e.compareAndSet(false, true)) {
            t7.a(l8.longValue(), false, this, new w(0, this));
        }
    }

    public void J0() {
        if (!z0()) {
            c("Initializing SDK in non-MAX environment...");
            return;
        }
        if (!this.f10384h0.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.EMPTY_MAP;
        }
    }

    public static long m() {
        return f10367y0;
    }

    public static Context n() {
        return f10365w0;
    }

    private void t0() {
        Context context = f10365w0;
        n I = I();
        o4 i02 = i0();
        p0 v8 = v();
        a(context);
        f0();
        j();
        o();
        V();
        L().a(MaxAdapter.InitializationStatus.INITIALIZING);
        NativeCrashReporter.a(this);
        String str = this.f10369a;
        if (str == null || str.length() != 86) {
            n.h("AppLovinSdk", "SDK key provided is invalid (" + this.f10369a + "). Expected length: 86 characters.\n\nStack trace:\n" + Log.getStackTraceString(new Throwable()));
        }
        if (v8.l()) {
            String str2 = "Terms Flow has been replaced. " + v8.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.f10379f.setVerboseLogging(true);
        }
        h0().a(l4.f9198k, Boolean.valueOf(this.f10379f.isVerboseLoggingEnabled()));
        l3.d(this);
        SharedPreferences defaultSharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);
        n4 n4Var = n4.f9767c;
        if (TextUtils.isEmpty((String) i02.a(n4Var, (Object) null, defaultSharedPreferences))) {
            this.f10390k0 = true;
            i02.b(n4Var, Boolean.toString(true), defaultSharedPreferences);
        } else {
            i02.b(n4Var, Boolean.toString(false), defaultSharedPreferences);
        }
        n4 n4Var2 = n4.f9768d;
        if (((Boolean) i02.a(n4Var2, Boolean.FALSE)).booleanValue()) {
            if (n.a()) {
                I.a("AppLovinSdk", "Initializing SDK for non-maiden launch");
            }
            this.f10392l0 = true;
        } else {
            if (n.a()) {
                I.a("AppLovinSdk", "Initializing SDK for maiden launch");
            }
            i02.b(n4Var2, Boolean.TRUE);
            i02.b(n4.f9779o, Boolean.valueOf(v8.j()));
        }
        n4 n4Var3 = n4.f9769e;
        String str3 = (String) i02.a(n4Var3, null);
        if (StringUtils.isValidString(str3)) {
            if (AppLovinSdk.VERSION_CODE > z6.g(str3)) {
                i02.b(n4Var3, AppLovinSdk.VERSION);
            }
        } else {
            i02.b(n4Var3, AppLovinSdk.VERSION);
        }
        o0().d(y1.f10991e, CollectionUtils.map("details", "isInitProviderContextSet=" + f10366x0));
    }

    public static boolean y0() {
        return f10368z0;
    }

    public k1 A() {
        return this.f10401q;
    }

    public boolean A0() {
        return z6.a("com.unity3d.player.UnityPlayerActivity");
    }

    public EventServiceImpl B() {
        Object obj = this.f10389k.get();
        if (obj == null) {
            synchronized (this.f10389k) {
                try {
                    obj = this.f10389k.get();
                    if (obj == null) {
                        obj = new EventServiceImpl(this);
                        this.f10389k.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.f10389k) {
            obj = null;
        }
        return (EventServiceImpl) obj;
    }

    public l C() {
        Object obj = this.D.get();
        if (obj == null) {
            synchronized (this.D) {
                try {
                    obj = this.D.get();
                    if (obj == null) {
                        obj = new l(this);
                        this.D.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.D) {
            obj = null;
        }
        return (l) obj;
    }

    public m D() {
        Object obj = this.F.get();
        if (obj == null) {
            synchronized (this.F) {
                try {
                    obj = this.F.get();
                    if (obj == null) {
                        obj = new m(this);
                        this.F.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.F) {
            obj = null;
        }
        return (m) obj;
    }

    public w1 E() {
        Object obj = this.f10411v.get();
        if (obj == null) {
            synchronized (this.f10411v) {
                try {
                    obj = this.f10411v.get();
                    if (obj == null) {
                        obj = new w1(this);
                        this.f10411v.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.f10411v) {
            obj = null;
        }
        return (w1) obj;
    }

    public Activity F() {
        WeakReference weakReference;
        if (!((Boolean) a(l4.f9164f4)).booleanValue() || (weakReference = this.f10371b) == null) {
            return null;
        }
        return (Activity) weakReference.get();
    }

    public void F0() {
        AppLovinSdk.SdkInitializationListener sdkInitializationListener;
        if (v().i() || (sdkInitializationListener = this.f10404r0) == null) {
            return;
        }
        if (u0()) {
            this.f10404r0 = null;
            this.f10406s0 = null;
            L().a(MaxAdapter.InitializationStatus.INITIALIZED_SUCCESS);
        } else {
            if (this.f10406s0 == sdkInitializationListener) {
                return;
            }
            L().a(MaxAdapter.InitializationStatus.INITIALIZED_FAILURE);
            if (((Boolean) a(l4.f9238p)).booleanValue()) {
                this.f10404r0 = null;
            } else {
                this.f10406s0 = sdkInitializationListener;
            }
        }
        AppLovinSdkUtils.runOnUiThreadDelayed(new v(this, sdkInitializationListener, 0), Math.max(0L, ((Long) a(l4.f9246q)).longValue()));
    }

    public AppLovinSdkInitializationConfiguration G() {
        return this.f10398o0;
    }

    public long H() {
        return this.f10373c;
    }

    public n I() {
        return this.f10395n;
    }

    public void I0() {
        if (StringUtils.isValidString(this.f10383h)) {
            return;
        }
        this.f10383h = AppLovinMediationProvider.MAX;
    }

    public r2 J() {
        return this.f10399p;
    }

    public com.applovin.impl.mediation.d K() {
        Object obj = this.f10374c0.get();
        if (obj == null) {
            synchronized (this.f10374c0) {
                try {
                    obj = this.f10374c0.get();
                    if (obj == null) {
                        obj = new com.applovin.impl.mediation.d(this);
                        this.f10374c0.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.f10374c0) {
            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) {
                try {
                    obj = this.X.get();
                    if (obj == null) {
                        obj = new com.applovin.impl.mediation.e(this);
                        this.X.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.X) {
            obj = null;
        }
        return (com.applovin.impl.mediation.e) obj;
    }

    public void L0() {
        synchronized (this.f10380f0) {
            this.f10386i0 = true;
            j0().f();
            d();
        }
    }

    public com.applovin.impl.mediation.f M() {
        Object obj = this.W.get();
        if (obj == null) {
            synchronized (this.W) {
                try {
                    obj = this.W.get();
                    if (obj == null) {
                        obj = new com.applovin.impl.mediation.f(this);
                        this.W.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.W) {
            obj = null;
        }
        return (com.applovin.impl.mediation.f) obj;
    }

    public f3 N() {
        Object obj = this.f10370a0.get();
        if (obj == null) {
            synchronized (this.f10370a0) {
                try {
                    obj = this.f10370a0.get();
                    if (obj == null) {
                        obj = new f3(this);
                        this.f10370a0.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.f10370a0) {
            obj = null;
        }
        return (f3) obj;
    }

    public void N0() {
        n.h("AppLovinSdk", "Resetting SDK state...");
        w1 E = E();
        v1 v1Var = v1.f10790l;
        long b6 = E.b(v1Var);
        h0().a();
        h0().e();
        E().a();
        E().b(v1Var, b6 + 1);
        if (this.f10382g0.compareAndSet(true, false)) {
            L0();
        } else {
            this.f10382g0.set(true);
        }
    }

    public String O() {
        return this.f10383h;
    }

    public void O0() {
        if (StringUtils.isValidString(this.f10396n0)) {
            return;
        }
        this.f10396n0 = AppLovinMediationProvider.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) {
                try {
                    obj = this.Y.get();
                    if (obj == null) {
                        obj = new MediationServiceImpl(this);
                        this.Y.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.Y) {
            obj = null;
        }
        return (MediationServiceImpl) obj;
    }

    public void Q0() {
        a((Map) null);
    }

    public j3 R() {
        Object obj = this.f10412w.get();
        if (obj == null) {
            synchronized (this.f10412w) {
                try {
                    obj = this.f10412w.get();
                    if (obj == null) {
                        obj = new j3(this);
                        this.f10412w.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.f10412w) {
            obj = null;
        }
        return (j3) obj;
    }

    public void R0() {
        if (AppLovinMediationProvider.ADMOB.equalsIgnoreCase(this.f10383h) && ((Boolean) a(l4.f9295w3)).booleanValue()) {
            String str = (String) a(l4.f9288v3);
            if (TextUtils.isEmpty(str)) {
                return;
            }
            StringBuilder sb = new StringBuilder();
            String str2 = AppLovinSdk.VERSION;
            sb.append(str2);
            sb.append(InstructionFileId.DOT);
            if (str.startsWith(sb.toString())) {
                return;
            }
            String o8 = com.mobilefuse.sdk.assetsmanager.a.o("Mismatched AdMob adapter (", str, ") and AppLovin SDK (", str2, ") versions detected, which may cause compatibility issues.");
            n.h("AppLovinSdk", o8);
            AppLovinSdkUtils.runOnUiThread(true, new t(4, this, o8));
        }
    }

    public k3 S() {
        Object obj = this.Z.get();
        if (obj == null) {
            synchronized (this.Z) {
                try {
                    obj = this.Z.get();
                    if (obj == null) {
                        obj = new k3();
                        this.Z.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.Z) {
            obj = null;
        }
        return (k3) obj;
    }

    public o T() {
        Object obj = this.f10372b0.get();
        if (obj == null) {
            synchronized (this.f10372b0) {
                try {
                    obj = this.f10372b0.get();
                    if (obj == null) {
                        obj = new o(this);
                        this.f10372b0.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.f10372b0) {
            obj = null;
        }
        return (o) obj;
    }

    public AppLovinNativeAdService U() {
        Object obj = this.f10387j.get();
        if (obj == null) {
            synchronized (this.f10387j) {
                try {
                    obj = this.f10387j.get();
                    if (obj == null) {
                        obj = new AppLovinNativeAdService(this);
                        this.f10387j.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.f10387j) {
            obj = null;
        }
        return (AppLovinNativeAdService) obj;
    }

    public n3 V() {
        Object obj = this.I.get();
        if (obj == null) {
            synchronized (this.I) {
                try {
                    obj = this.I.get();
                    if (obj == null) {
                        obj = new n3(n());
                        this.I.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.I) {
            obj = null;
        }
        return (n3) obj;
    }

    public w3 W() {
        Object obj = this.P.get();
        if (obj == null) {
            synchronized (this.P) {
                try {
                    obj = this.P.get();
                    if (obj == null) {
                        obj = new w3(this);
                        this.P.set(obj);
                    }
                } finally {
                }
            }
        }
        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) {
                try {
                    obj = this.U.get();
                    if (obj == null) {
                        obj = new com.applovin.impl.sdk.network.b(this);
                        this.U.set(obj);
                    }
                } finally {
                }
            }
        }
        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) {
                try {
                    obj = this.T.get();
                    if (obj == null) {
                        obj = new PostbackServiceImpl(this);
                        this.T.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.T) {
            obj = null;
        }
        return (PostbackServiceImpl) obj;
    }

    public q Z() {
        Object obj = this.f10414y.get();
        if (obj == null) {
            synchronized (this.f10414y) {
                try {
                    obj = this.f10414y.get();
                    if (obj == null) {
                        obj = G0();
                        if (obj == null) {
                            obj = this.f10414y;
                        }
                        this.f10414y.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.f10414y) {
            obj = null;
        }
        return (q) obj;
    }

    public String a0() {
        return p0().a();
    }

    public String b0() {
        return this.f10369a;
    }

    public MaxSegmentCollectionImpl c0() {
        return (MaxSegmentCollectionImpl) this.f10381g;
    }

    public Map d0() {
        MaxSegmentCollectionImpl c02 = c0();
        if (c02 == null) {
            return null;
        }
        return c02.getJsonData();
    }

    public k4 e0() {
        Object obj = this.K.get();
        if (obj == null) {
            synchronized (this.K) {
                try {
                    obj = this.K.get();
                    if (obj == null) {
                        obj = new k4(this);
                        this.K.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.K) {
            obj = null;
        }
        return (k4) obj;
    }

    public SessionTracker f0() {
        Object obj = this.E.get();
        if (obj == null) {
            synchronized (this.E) {
                try {
                    obj = this.E.get();
                    if (obj == null) {
                        obj = new SessionTracker(this);
                        this.E.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.E) {
            obj = null;
        }
        return (SessionTracker) obj;
    }

    public AppLovinSdkSettings g0() {
        return this.f10379f;
    }

    public m4 h0() {
        Object obj = this.f10407t.get();
        if (obj == null) {
            synchronized (this.f10407t) {
                try {
                    obj = this.f10407t.get();
                    if (obj == null) {
                        obj = new m4(this);
                        this.f10407t.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.f10407t) {
            obj = null;
        }
        return (m4) obj;
    }

    public o4 i0() {
        Object obj = this.f10415z.get();
        if (obj == null) {
            synchronized (this.f10415z) {
                try {
                    obj = this.f10415z.get();
                    if (obj == null) {
                        obj = new o4(this);
                        this.f10415z.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.f10415z) {
            obj = null;
        }
        return (o4) obj;
    }

    public r5 j0() {
        Object obj = this.f10405s.get();
        if (obj == null) {
            synchronized (this.f10405s) {
                try {
                    obj = this.f10405s.get();
                    if (obj == null) {
                        obj = new r5(this);
                        this.f10405s.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.f10405s) {
            obj = null;
        }
        return (r5) obj;
    }

    public m6 k0() {
        Object obj = this.N.get();
        if (obj == null) {
            synchronized (this.N) {
                try {
                    obj = this.N.get();
                    if (obj == null) {
                        obj = new m6(this);
                        this.N.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.N) {
            obj = null;
        }
        return (m6) obj;
    }

    public g l() {
        Object obj = this.G.get();
        if (obj == null) {
            synchronized (this.G) {
                try {
                    obj = this.G.get();
                    if (obj == null) {
                        obj = new g(this);
                        this.G.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.G) {
            obj = null;
        }
        return (g) obj;
    }

    public s6 l0() {
        Object obj = this.f10376d0.get();
        if (obj == null) {
            synchronized (this.f10376d0) {
                try {
                    obj = this.f10376d0.get();
                    if (obj == null) {
                        obj = new s6(this);
                        this.f10376d0.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.f10376d0) {
            obj = null;
        }
        return (s6) obj;
    }

    public long m0() {
        if (this.f10375d == 0) {
            return -1L;
        }
        return System.currentTimeMillis() - this.f10375d;
    }

    public Activity n0() {
        Activity b6 = a(n()).b();
        return b6 != null ? b6 : F();
    }

    public ArrayService o() {
        Object obj = this.Q.get();
        if (obj == null) {
            synchronized (this.Q) {
                try {
                    obj = this.Q.get();
                    if (obj == null) {
                        obj = new ArrayService(this);
                        this.Q.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.Q) {
            obj = null;
        }
        return (ArrayService) obj;
    }

    public x6 o0() {
        return this.f10403r;
    }

    public h p() {
        Object obj = this.L.get();
        if (obj == null) {
            synchronized (this.L) {
                try {
                    obj = this.L.get();
                    if (obj == null) {
                        obj = new h(this);
                        this.L.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.L) {
            obj = null;
        }
        return (h) obj;
    }

    public y6 p0() {
        Object obj = this.A.get();
        if (obj == null) {
            synchronized (this.A) {
                try {
                    obj = this.A.get();
                    if (obj == null) {
                        obj = new y6(this);
                        this.A.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.A) {
            obj = null;
        }
        return (y6) obj;
    }

    public CmpServiceImpl q() {
        Object obj = this.f10391l.get();
        if (obj == null) {
            synchronized (this.f10391l) {
                try {
                    obj = this.f10391l.get();
                    if (obj == null) {
                        obj = new CmpServiceImpl(this);
                        this.f10391l.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.f10391l) {
            obj = null;
        }
        return (CmpServiceImpl) obj;
    }

    public x7 q0() {
        Object obj = this.H.get();
        if (obj == null) {
            synchronized (this.H) {
                try {
                    obj = this.H.get();
                    if (obj == null) {
                        obj = new x7(this);
                        this.H.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.H) {
            obj = null;
        }
        return (x7) obj;
    }

    public i r() {
        Object obj = this.J.get();
        if (obj == null) {
            synchronized (this.J) {
                try {
                    obj = this.J.get();
                    if (obj == null) {
                        obj = new i(this);
                        this.J.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.J) {
            obj = null;
        }
        return (i) obj;
    }

    public AppLovinSdk r0() {
        return this.f10393m;
    }

    public String s() {
        return p0().b();
    }

    public boolean s0() {
        return this.f10392l0;
    }

    public AppLovinSdkConfiguration t() {
        return this.f10402q0;
    }

    public String toString() {
        StringBuilder sb = new StringBuilder("CoreSdk{sdkKey='");
        sb.append(this.f10369a);
        sb.append("', enabled=");
        sb.append(this.f10388j0);
        sb.append(", isFirstSession=");
        return androidx.fragment.app.n.s(sb, this.f10390k0, '}');
    }

    public m0 u() {
        Object obj = this.f10409u.get();
        if (obj == null) {
            synchronized (this.f10409u) {
                try {
                    obj = this.f10409u.get();
                    if (obj == null) {
                        obj = new m0(this);
                        this.f10409u.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.f10409u) {
            obj = null;
        }
        return (m0) obj;
    }

    public boolean u0() {
        boolean z8;
        synchronized (this.f10380f0) {
            z8 = this.f10388j0;
        }
        return z8;
    }

    public p0 v() {
        Object obj = this.M.get();
        if (obj == null) {
            synchronized (this.M) {
                try {
                    obj = this.M.get();
                    if (obj == null) {
                        obj = new p0(this);
                        this.M.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.M) {
            obj = null;
        }
        return (p0) obj;
    }

    public boolean v0() {
        return this.f10390k0;
    }

    public z0 w() {
        Object obj = this.O.get();
        if (obj == null) {
            synchronized (this.O) {
                try {
                    obj = this.O.get();
                    if (obj == null) {
                        obj = new z0(this);
                        this.O.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.O) {
            obj = null;
        }
        return (z0) obj;
    }

    public boolean w0() {
        boolean z8;
        synchronized (this.f10400p0) {
            z8 = this.f10398o0 != null;
        }
        return z8;
    }

    public a1 x() {
        Object obj = this.R.get();
        if (obj == null) {
            synchronized (this.R) {
                try {
                    obj = this.R.get();
                    if (obj == null) {
                        obj = new a1(this);
                        this.R.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.R) {
            obj = null;
        }
        return (a1) obj;
    }

    public boolean x0() {
        boolean z8;
        synchronized (this.f10380f0) {
            z8 = this.f10386i0;
        }
        return z8;
    }

    public k y() {
        Object obj = this.f10413x.get();
        if (obj == null) {
            synchronized (this.f10413x) {
                try {
                    obj = this.f10413x.get();
                    if (obj == null) {
                        obj = new k(this);
                        this.f10413x.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.f10413x) {
            obj = null;
        }
        return (k) obj;
    }

    public String z() {
        return this.f10396n0;
    }

    public boolean z0() {
        return StringUtils.containsIgnoreCase(O(), AppLovinMediationProvider.MAX);
    }

    private void d() {
        r5 j02 = j0();
        int i8 = this.f10394m0 + 1;
        this.f10394m0 = i8;
        j02.a((w4) new h5(i8, this, new a()), r5.b.CORE);
    }

    public com.applovin.impl.c e() {
        return a(f10365w0);
    }

    public com.applovin.impl.sdk.a f() {
        Object obj = this.C.get();
        if (obj == null) {
            synchronized (this.C) {
                try {
                    obj = this.C.get();
                    if (obj == null) {
                        obj = new com.applovin.impl.sdk.a(this);
                        this.C.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.C) {
            obj = null;
        }
        return (com.applovin.impl.sdk.a) obj;
    }

    public com.applovin.impl.f g() {
        return this.f10397o;
    }

    public com.applovin.impl.sdk.d h() {
        Object obj = this.S.get();
        if (obj == null) {
            synchronized (this.S) {
                try {
                    obj = this.S.get();
                    if (obj == null) {
                        obj = new com.applovin.impl.sdk.d(this);
                        this.S.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.S) {
            obj = null;
        }
        return (com.applovin.impl.sdk.d) obj;
    }

    public e i() {
        Object obj = this.B.get();
        if (obj == null) {
            synchronized (this.B) {
                try {
                    obj = this.B.get();
                    if (obj == null) {
                        obj = new e(this);
                        this.B.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.B) {
            obj = null;
        }
        return (e) obj;
    }

    public com.applovin.impl.h j() {
        Object obj = this.V.get();
        if (obj == null) {
            synchronized (this.V) {
                try {
                    obj = this.V.get();
                    if (obj == null) {
                        obj = new com.applovin.impl.h(this);
                        this.V.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.V) {
            obj = null;
        }
        return (com.applovin.impl.h) obj;
    }

    public AppLovinAdServiceImpl k() {
        Object obj = this.f10385i.get();
        if (obj == null) {
            synchronized (this.f10385i) {
                try {
                    obj = this.f10385i.get();
                    if (obj == null) {
                        obj = new AppLovinAdServiceImpl(this);
                        this.f10385i.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.f10385i) {
            obj = null;
        }
        return (AppLovinAdServiceImpl) obj;
    }

    public static void b(Context context) {
        if (context == null) {
            return;
        }
        f10365w0 = context.getApplicationContext();
        f10366x0 = true;
    }

    public void c(JSONObject jSONObject) {
        this.f10375d = 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.f10379f.attachAppLovinSdk(this);
        String pluginVersion = appLovinSdkInitializationConfiguration.getPluginVersion();
        if (pluginVersion != null) {
            n.g("AppLovinSdk", "Setting plugin version: ".concat(pluginVersion));
            h0().a(l4.f9288v3, pluginVersion);
        }
        if (appLovinSdkInitializationConfiguration.isExceptionHandlerEnabled() && ((Boolean) a(l4.f9262s)).booleanValue()) {
            AppLovinExceptionHandler.shared().addSdk(this);
            AppLovinExceptionHandler.shared().enable();
        }
        r5 j02 = j0();
        w4 w4Var = this.f10408t0;
        r5.b bVar = r5.b.CORE;
        j02.a(w4Var, bVar);
        j0().a(this.f10410u0, bVar);
    }

    public void a(AppLovinSdk appLovinSdk) {
        this.f10393m = appLovinSdk;
    }

    public static String a(String str) {
        return a(str, (List) null);
    }

    public static String a(int i8) {
        return a(i8, (List) null);
    }

    public static String a(String str, List list) {
        if (TextUtils.isEmpty(str)) {
            return "";
        }
        Context n8 = n();
        return a(n8.getResources().getIdentifier(str, "string", n8.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 i8, List list) {
        String string = n().getResources().getString(i8);
        return list != null ? String.format(string, list.toArray()) : string;
    }

    public void c() {
        synchronized (this.f10380f0) {
            try {
                if (!this.f10386i0 && !this.f10388j0) {
                    L0();
                }
            } catch (Throwable th) {
                throw th;
            }
        }
    }

    public void b(JSONObject jSONObject) {
        Iterator it = JsonUtils.getList(jSONObject, "error_messages", Collections.EMPTY_LIST).iterator();
        while (it.hasNext()) {
            n.h("AppLovinSdk", (String) it.next());
        }
    }

    public static com.applovin.impl.c a(Context context) {
        if (A0 == null) {
            synchronized (B0) {
                try {
                    if (A0 == null) {
                        A0 = new com.applovin.impl.c(context);
                    }
                } finally {
                }
            }
        }
        return A0;
    }

    public void b(String str) {
        if (!z6.c(this)) {
            A().a(y1.f11012o0, "adapterVersionMismatch", com.mobilefuse.sdk.assetsmanager.a.t("details", AppLovinMediationProvider.ADMOB, "error_message", str));
            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(AppLovinSdkInitializationConfiguration appLovinSdkInitializationConfiguration, AppLovinSdk.SdkInitializationListener sdkInitializationListener) {
        synchronized (this.f10400p0) {
            try {
                if (this.f10398o0 != null) {
                    n.h("AppLovinSdk", "AppLovin SDK already initialized with configuration: " + this.f10398o0 + ". Ignoring the provided initialization configuration.");
                    if (!u0() || sdkInitializationListener == null) {
                        return;
                    }
                    AppLovinSdkUtils.runOnUiThread(new v(this, sdkInitializationListener, 1));
                    return;
                }
                this.f10398o0 = appLovinSdkInitializationConfiguration;
                this.f10404r0 = sdkInitializationListener;
                this.f10369a = appLovinSdkInitializationConfiguration.getSdkKey();
                this.f10383h = appLovinSdkInitializationConfiguration.getMediationProvider();
                this.f10381g = appLovinSdkInitializationConfiguration.getSegmentCollection();
                z6.a((Runnable) new t(5, this, appLovinSdkInitializationConfiguration));
            } catch (Throwable th) {
                throw th;
            }
        }
    }

    public void b(AppLovinSdk.SdkInitializationListener sdkInitializationListener) {
        I();
        if (n.a()) {
            I().a("AppLovinSdk", "Calling back publisher's initialization completion handler...");
        }
        sdkInitializationListener.onSdkInitialized(this.f10402q0);
    }

    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.f10402q0);
    }

    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 z8) {
        synchronized (this.f10380f0) {
            this.f10386i0 = false;
            this.f10388j0 = z8;
        }
        if (z8) {
            List a8 = l3.a(this);
            if (a8.isEmpty()) {
                j0().e();
                F0();
                return;
            }
            Long l8 = (Long) a(g3.f8827w6);
            f6 f6Var = new f6(this, true, "timeoutInitAdapters", new w(3, this));
            I();
            if (n.a()) {
                I().a("AppLovinSdk", "Waiting for required adapters to init: " + a8 + " - timing out in " + l8 + "ms...");
            }
            j0().a(f6Var, r5.b.TIMEOUT, l8.longValue(), true);
        }
    }

    public void a(a3 a3Var) {
        if (j0().d()) {
            return;
        }
        List a8 = l3.a(this);
        if (a8.size() <= 0 || !L().a().containsAll(a8)) {
            return;
        }
        I();
        if (n.a()) {
            I().a("AppLovinSdk", "All required adapters initialized");
        }
        j0().e();
        F0();
    }

    public boolean a(MaxAdFormat maxAdFormat) {
        List list = this.f10378e0;
        return (list == null || list.size() <= 0 || this.f10378e0.contains(maxAdFormat)) ? false : true;
    }

    public void a() {
        String str = (String) i0().a(n4.f9769e, null);
        if (StringUtils.isValidString(str)) {
            if (AppLovinSdk.VERSION_CODE < z6.g(str)) {
                n.h("AppLovinSdk", d0.t(new StringBuilder("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);
    }
}