导航菜单

页面标题

页面副标题

All File Recovery v1.0.2 - C2932k.java 源代码

正在查看: All File Recovery v1.0.2 应用的 C2932k.java JAVA 源代码文件

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


package com.applovin.impl.sdk;

import Rd.C1986b;
import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.net.Uri;
import android.preference.PreferenceManager;
import android.text.TextUtils;
import android.util.Log;
import com.applovin.impl.AbstractC2752b3;
import com.applovin.impl.AbstractC2778e2;
import com.applovin.impl.AbstractC2780e4;
import com.applovin.impl.AbstractC2796g3;
import com.applovin.impl.AbstractC2835l2;
import com.applovin.impl.AbstractC2836l3;
import com.applovin.impl.AbstractC2874n0;
import com.applovin.impl.AbstractC3002z6;
import com.applovin.impl.AbstractRunnableC2976w4;
import com.applovin.impl.C2732a1;
import com.applovin.impl.C2734a3;
import com.applovin.impl.C2757c;
import com.applovin.impl.C2777e1;
import com.applovin.impl.C2784f;
import com.applovin.impl.C2788f3;
import com.applovin.impl.C2791f6;
import com.applovin.impl.C2806h5;
import com.applovin.impl.C2808i;
import com.applovin.impl.C2820j3;
import com.applovin.impl.C2828k3;
import com.applovin.impl.C2829k4;
import com.applovin.impl.C2837l4;
import com.applovin.impl.C2841m0;
import com.applovin.impl.C2842m1;
import com.applovin.impl.C2845m4;
import com.applovin.impl.C2877n3;
import com.applovin.impl.C2878n4;
import com.applovin.impl.C2886o4;
import com.applovin.impl.C2890p0;
import com.applovin.impl.C2903q5;
import com.applovin.impl.C2907r2;
import com.applovin.impl.C2910r5;
import com.applovin.impl.C2919s6;
import com.applovin.impl.C2975w3;
import com.applovin.impl.C2986x6;
import com.applovin.impl.C2989y1;
import com.applovin.impl.C2994y6;
import com.applovin.impl.C2996z0;
import com.applovin.impl.SharedPreferencesOnSharedPreferenceChangeListenerC2847m6;
import com.applovin.impl.mediation.C2851d;
import com.applovin.impl.mediation.C2852e;
import com.applovin.impl.mediation.C2853f;
import com.applovin.impl.mediation.C2854g;
import com.applovin.impl.mediation.MaxSegmentCollectionImpl;
import com.applovin.impl.mediation.MediationServiceImpl;
import com.applovin.impl.privacy.cmp.CmpServiceImpl;
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.x7;
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.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 C2932k {

    public static C2932k f42791C0;

    protected static Context f42792D0;

    private static boolean f42793E0;

    private static final boolean f42795G0;

    private static volatile C2757c f42796H0;

    private String f42826a;

    private String f42828b;

    private WeakReference f42830c;

    private final long f42832d;

    private long f42834e;

    private long f42836f;

    private Long f42838g;

    private long f42840h;

    private C2852e f42843i0;

    private final AppLovinSdkSettings f42844j;

    private MaxSegmentCollection f42846k;

    private List f42847k0;

    private String f42848l;

    private boolean f42857p0;

    private volatile AppLovinSdk f42858q;

    private String f42867u0;

    private AppLovinSdkInitializationConfiguration f42869v0;

    private AppLovinSdk.SdkInitializationListener f42875y0;

    private AppLovinSdk.SdkInitializationListener f42877z0;

    private static final Object f42797I0 = new Object();

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

    private final AtomicBoolean f42842i = new AtomicBoolean();

    private final AtomicReference f42850m = new AtomicReference();

    private final AtomicReference f42852n = new AtomicReference();

    private final AtomicReference f42854o = new AtomicReference();

    private final AtomicReference f42856p = new AtomicReference();

    private final C2936o f42860r = new C2936o(this);

    private final C2784f f42862s = new C2784f(this);

    private final C2907r2 f42864t = new C2907r2(this);

    private final C2842m1 f42866u = new C2842m1(this);

    private final C2986x6 f42868v = new C2986x6(this);

    private final AtomicReference f42870w = new AtomicReference();

    private final AtomicReference f42872x = new AtomicReference();

    private final AtomicReference f42874y = new AtomicReference();

    private final AtomicReference f42876z = new AtomicReference();

    private final AtomicReference f42798A = new AtomicReference();

    private final AtomicReference f42800B = new AtomicReference();

    private final AtomicReference f42802C = new AtomicReference();

    private final AtomicReference f42803D = new AtomicReference();

    private final AtomicReference f42804E = new AtomicReference();

    private final AtomicReference f42805F = new AtomicReference();

    private final AtomicReference f42806G = new AtomicReference();

    private final AtomicReference f42807H = new AtomicReference();

    private final AtomicReference f42808I = new AtomicReference();

    private final AtomicReference f42809J = new AtomicReference();

    private final AtomicReference f42810K = new AtomicReference();

    private final AtomicReference f42811L = new AtomicReference();

    private final AtomicReference f42812M = new AtomicReference();

    private final AtomicReference f42813N = new AtomicReference();

    private final AtomicReference f42814O = new AtomicReference();

    private final AtomicReference f42815P = new AtomicReference();

    private final AtomicReference f42816Q = new AtomicReference();

    private final AtomicReference f42817R = new AtomicReference();

    private final AtomicReference f42818S = new AtomicReference();

    private final AtomicReference f42819T = new AtomicReference();

    private final AtomicReference f42820U = new AtomicReference();

    private final AtomicReference f42821V = new AtomicReference();

    private final AtomicReference f42822W = new AtomicReference();

    private final AtomicReference f42823X = new AtomicReference();

    private final AtomicReference f42824Y = new AtomicReference();

    private final AtomicReference f42825Z = new AtomicReference();

    private final AtomicReference f42827a0 = new AtomicReference();

    private final AtomicReference f42829b0 = new AtomicReference();

    private final AtomicReference f42831c0 = new AtomicReference();

    private final AtomicReference f42833d0 = new AtomicReference();

    private final AtomicReference f42835e0 = new AtomicReference();

    private final AtomicReference f42837f0 = new AtomicReference();

    private final AtomicReference f42839g0 = new AtomicReference();

    private final AtomicReference f42841h0 = new AtomicReference();

    private final AtomicReference f42845j0 = new AtomicReference();

    private final Object f42849l0 = new Object();

    private final AtomicBoolean f42851m0 = new AtomicBoolean(true);

    private final AtomicBoolean f42853n0 = new AtomicBoolean();

    private final AtomicBoolean f42855o0 = new AtomicBoolean();

    private boolean f42859q0 = false;

    private boolean f42861r0 = false;

    private boolean f42863s0 = false;

    private int f42865t0 = 0;

    private final Object f42871w0 = new Object();

    private SdkConfigurationImpl f42873x0 = new SdkConfigurationImpl(this);

    private final AbstractRunnableC2976w4 f42799A0 = new C2791f6(this, true, "scheduleAdLoadIntegrationError", new Runnable() {
        @Override
        public final void run() {
            C2932k.this.K0();
        }
    });

    private final AbstractRunnableC2976w4 f42801B0 = new C2791f6(this, true, "sdkInit", new Runnable() {
        @Override
        public final void run() {
            C2932k.this.L0();
        }
    });

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

        @Override
        public void a(JSONObject jSONObject) {
            boolean isValid = JsonUtils.isValid(jSONObject);
            C2932k.this.c(jSONObject);
            if (((Boolean) C2932k.this.a(AbstractC2796g3.f40769B7)).booleanValue()) {
                C2932k c2932k = C2932k.this;
                c2932k.f42843i0 = new C2852e(c2932k);
            }
            C2932k.this.m().a();
            AbstractC2874n0.a(jSONObject, isValid, C2932k.this);
            Boolean bool = JsonUtils.getBoolean(jSONObject, "smd", Boolean.FALSE);
            C2932k.this.U().a(bool.booleanValue(), JsonUtils.getInt(jSONObject, "smd_delay_sec", 2));
            C2932k.this.E().b();
            C2932k c2932k2 = C2932k.this;
            c2932k2.f42847k0 = c2932k2.a(jSONObject);
            if (isValid) {
                C2932k.this.f42873x0.setEnabledAmazonAdUnitIds(CollectionUtils.explode(JsonUtils.getString(jSONObject, "eaaui", "")));
            }
            C2932k.this.s0().a(jSONObject);
            C2932k.this.b(jSONObject);
            AbstractC2835l2.b(((Boolean) C2932k.this.a(C2837l4.f41232R5)).booleanValue());
            AbstractC2835l2.a(((Boolean) C2932k.this.a(C2837l4.f41239S5)).booleanValue());
            C2932k.this.Q0();
            if (!((Boolean) C2932k.this.a(C2837l4.f41257V2)).booleanValue() || isValid || !AbstractC2874n0.a(C2932k.o())) {
                C2932k.this.O0();
                return;
            }
            C2932k.this.O();
            if (C2936o.a()) {
                C2932k.this.O().d("AppLovinSdk", "SDK initialized with no internet connection - listening for connection");
            }
            C2932k.this.T0();
        }
    }

    public class b implements C2890p0.c {
        public b() {
        }

        @Override
        public void a(C2890p0.b bVar) {
            C2932k.this.O();
            if (C2936o.a()) {
                C2932k.this.O().a("AppLovinSdk", "Terms and Privacy Policy flow completed with status: " + bVar);
            }
            C2932k.this.f42855o0.set(bVar.b());
            if (!bVar.a()) {
                C2932k.this.c("Initializing SDK in MAX environment...");
                return;
            }
            C2932k.this.O();
            if (C2936o.a()) {
                C2932k.this.O().a("AppLovinSdk", "Re-initializing SDK with the updated privacy settings...");
            }
            C2932k.this.S0();
            C2932k.this.R0();
        }
    }

    public class c implements C2806h5.b {
        public c() {
        }

        @Override
        public void a(JSONObject jSONObject) {
            C2932k.this.c(jSONObject);
            C2932k.this.f42842i.set(false);
            C2932k.this.O0();
        }
    }

    public class d implements C2877n3.a {

        final C2877n3 f42881a;

        public d(C2877n3 c2877n3) {
            this.f42881a = c2877n3;
        }

        @Override
        public void a() {
            C2932k.this.O();
            if (C2936o.a()) {
                C2932k.this.O().d("AppLovinSdk", "Connected to internet - re-initializing SDK");
            }
            synchronized (C2932k.this.f42849l0) {
                try {
                    if (!C2932k.this.f42857p0) {
                        C2932k.this.S0();
                    }
                } catch (Throwable th) {
                    throw th;
                }
            }
            this.f42881a.b(this);
        }

        @Override
        public void b() {
        }
    }

    static {
        try {
            AppLovinSdkUtils.runOnUiThread(new N());
            f42795G0 = true;
        } catch (Throwable unused) {
            f42795G0 = false;
        }
    }

    public C2932k(AppLovinSdkSettings appLovinSdkSettings, Context context) {
        this.f42857p0 = false;
        f42791C0 = this;
        this.f42844j = appLovinSdkSettings;
        this.f42832d = System.currentTimeMillis();
        this.f42857p0 = true;
        if (!F0()) {
            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");
        }
        f42792D0 = context.getApplicationContext();
        if (context instanceof Activity) {
            this.f42830c = new WeakReference((Activity) context);
        }
    }

    private void A0() {
        Context context = f42792D0;
        C2936o O10 = O();
        C2886o4 p02 = p0();
        C2890p0 y10 = y();
        a(context);
        m0();
        j();
        p();
        c0();
        S().a(MaxAdapter.InitializationStatus.INITIALIZING);
        NativeCrashReporter.a(this);
        String str = this.f42826a;
        if (str == null || str.length() != 86) {
            C2936o.h("AppLovinSdk", "SDK key provided is invalid (" + this.f42826a + "). Expected length: 86 characters.\n\nStack trace:\n" + Log.getStackTraceString(new Throwable()));
        }
        if (StringUtils.isValidString(this.f42828b) && this.f42828b.length() != 36) {
            String a10 = O.c.a(new StringBuilder("Axon event key length "), this.f42828b, " is invalid - expected 36");
            if (AbstractC3002z6.c(this)) {
                throw new IllegalArgumentException(a10);
            }
            C2936o.h("AppLovinSdk", a10);
        }
        if (y10.l()) {
            String str2 = "Terms Flow has been replaced. " + y10.g();
            if (AbstractC3002z6.c(this)) {
                throw new IllegalStateException(str2);
            }
            C2936o.h("AppLovinSdk", str2);
        }
        if (AbstractC3002z6.i()) {
            C2936o.h("AppLovinSdk", "Failed to find class for name: com.applovin.sdk.AppLovinSdk. Please ensure proguard rules have not been omitted from the build.");
        }
        if (!AbstractC3002z6.b(this)) {
            C2936o.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 (AbstractC3002z6.k(context)) {
            this.f42844j.setVerboseLogging(true);
        }
        o0().a(C2837l4.f41367k, Boolean.valueOf(this.f42844j.isVerboseLoggingEnabled()));
        AbstractC2836l3.d(this);
        SharedPreferences defaultSharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);
        C2878n4 c2878n4 = C2878n4.f42095c;
        if (TextUtils.isEmpty((String) p02.a(c2878n4, (Object) null, defaultSharedPreferences))) {
            this.f42861r0 = true;
            p02.b(c2878n4, Boolean.toString(true), defaultSharedPreferences);
        } else {
            p02.b(c2878n4, Boolean.toString(false), defaultSharedPreferences);
        }
        C2878n4 c2878n42 = C2878n4.f42096d;
        if (((Boolean) p02.a(c2878n42, Boolean.FALSE)).booleanValue()) {
            if (C2936o.a()) {
                O10.a("AppLovinSdk", "Initializing SDK for non-maiden launch");
            }
            this.f42863s0 = true;
        } else {
            if (C2936o.a()) {
                O10.a("AppLovinSdk", "Initializing SDK for maiden launch");
            }
            p02.b(c2878n42, Boolean.TRUE);
            p02.b(C2878n4.f42110r, Boolean.valueOf(y10.j()));
        }
        C2878n4 c2878n43 = C2878n4.f42097e;
        this.f42836f = ((Long) p02.a(c2878n43, 0L)).longValue() + 1;
        p0().b(c2878n43, Long.valueOf(this.f42836f));
        C2878n4 c2878n44 = C2878n4.f42098f;
        this.f42838g = (Long) p02.a(c2878n44, null);
        p0().b(c2878n44, Long.valueOf(f42794F0));
        C2878n4 c2878n45 = C2878n4.f42099g;
        String str3 = (String) p02.a(c2878n45, null);
        if (StringUtils.isValidString(str3)) {
            if (AppLovinSdk.VERSION_CODE > AbstractC3002z6.g(str3)) {
                p02.b(c2878n45, AppLovinSdk.VERSION);
            }
        } else {
            p02.b(c2878n45, AppLovinSdk.VERSION);
        }
        v0().d(C2989y1.f43471e, CollectionUtils.map("details", "isInitProviderContextSet=" + f42793E0));
    }

    public static boolean F0() {
        return f42795G0;
    }

    public void I0() {
        if (q0().d()) {
            return;
        }
        O();
        if (C2936o.a()) {
            O().a("AppLovinSdk", "Timing out adapters init...");
        }
        q0().e();
        b(true);
    }

    public void J0() {
        C2910r5 q02 = q0();
        int i10 = this.f42865t0 + 1;
        this.f42865t0 = i10;
        q02.a((AbstractRunnableC2976w4) new C2806h5(i10, this, new c()), C2910r5.b.CORE);
    }

    public void K0() {
        if (G0()) {
            AbstractC2778e2.b(this);
        }
    }

    public void L0() {
        synchronized (this.f42849l0) {
            try {
                boolean a10 = AbstractC2874n0.a(o());
                if (!G0()) {
                    O();
                    if (C2936o.a()) {
                        O().a("AppLovinSdk", "non-MAX mediation detected, mediation provider is: " + V());
                    }
                }
                if (!((Boolean) a(C2837l4.f41264W2)).booleanValue() || a10) {
                    S0();
                }
                if (((Boolean) a(C2837l4.f41257V2)).booleanValue() && !a10) {
                    O();
                    if (C2936o.a()) {
                        O().d("AppLovinSdk", "SDK initialized with no internet connection - listening for connection");
                    }
                    T0();
                }
            } catch (Throwable th) {
                throw th;
            }
        }
    }

    private r N0() {
        if (!AbstractC2780e4.f(f42792D0)) {
            return null;
        }
        try {
            return new r(this);
        } catch (Throwable th) {
            C2936o.b("AppLovinSdk", "Failed to initialize Privacy Sandbox Service", th);
            return null;
        }
    }

    public void O0() {
        Long l10 = (Long) a(C2837l4.f41323e3);
        if (l10.longValue() >= 0 && this.f42842i.compareAndSet(false, true)) {
            t7.a(l10.longValue(), false, this, new Runnable() {
                @Override
                public final void run() {
                    C2932k.this.J0();
                }
            });
        }
    }

    public void Q0() {
        if (!G0()) {
            c("Initializing SDK in non-MAX environment...");
            return;
        }
        if (!this.f42853n0.compareAndSet(false, true)) {
            c("Consent flow is already shown. Initializing SDK in MAX environment...");
        } else if (!y().j()) {
            c("Consent flow is not enabled. Initializing SDK in MAX environment...");
        } else {
            y().a(u0(), new b());
        }
    }

    public void T0() {
        C2877n3 c02 = c0();
        c02.a(new d(c02));
    }

    private Map W() {
        try {
            return JsonUtils.toStringMap(new JSONObject((String) a(C2837l4.f41279Y3)));
        } catch (JSONException unused) {
            return Collections.EMPTY_MAP;
        }
    }

    public static Context o() {
        return f42792D0;
    }

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

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

    public boolean B0() {
        boolean z10;
        synchronized (this.f42849l0) {
            z10 = this.f42859q0;
        }
        return z10;
    }

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

    public boolean C0() {
        return this.f42861r0;
    }

    public String D() {
        return this.f42867u0;
    }

    public boolean D0() {
        boolean z10;
        synchronized (this.f42871w0) {
            z10 = this.f42869v0 != null;
        }
        return z10;
    }

    public C2842m1 E() {
        return this.f42866u;
    }

    public boolean E0() {
        boolean z10;
        synchronized (this.f42849l0) {
            z10 = this.f42857p0;
        }
        return z10;
    }

    public String F() {
        return w0().d();
    }

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

    public boolean G0() {
        return StringUtils.containsIgnoreCase(V(), AppLovinMediationProvider.MAX);
    }

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

    public boolean H0() {
        return AbstractC3002z6.a("com.unity3d.player.UnityPlayerActivity");
    }

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

    public Activity J() {
        WeakReference weakReference;
        if (!((Boolean) a(C2837l4.f41388m4)).booleanValue() || (weakReference = this.f42830c) == null) {
            return null;
        }
        return (Activity) weakReference.get();
    }

    public AppLovinSdkInitializationConfiguration K() {
        return this.f42869v0;
    }

    public long L() {
        return this.f42832d;
    }

    public Long M() {
        return this.f42838g;
    }

    public void M0() {
        b(false);
    }

    public long N() {
        return this.f42836f;
    }

    public C2936o O() {
        return this.f42860r;
    }

    public C2907r2 P() {
        return this.f42864t;
    }

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

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

    public C2852e R() {
        return this.f42843i0;
    }

    public void R0() {
        u().a();
    }

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

    public void S0() {
        synchronized (this.f42849l0) {
            this.f42857p0 = true;
            q0().f();
            d();
        }
    }

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

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

    public void U0() {
        C2936o.h("AppLovinSdk", "Resetting SDK state...");
        o0().a();
        o0().e();
        if (this.f42851m0.compareAndSet(true, false)) {
            S0();
        } else {
            this.f42851m0.set(true);
        }
    }

    public String V() {
        return this.f42848l;
    }

    public void V0() {
        if (StringUtils.isValidString(this.f42867u0)) {
            return;
        }
        this.f42867u0 = AppLovinMediationProvider.MAX;
        O();
        if (C2936o.a()) {
            O().a("AppLovinSdk", "Detected mediation provider: MAX");
        }
    }

    public void W0() {
        z().n();
    }

    public MediationServiceImpl X() {
        Object obj = this.f42833d0.get();
        if (obj == null) {
            synchronized (this.f42833d0) {
                try {
                    obj = this.f42833d0.get();
                    if (obj == null) {
                        obj = new MediationServiceImpl(this);
                        this.f42833d0.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.f42833d0) {
            obj = null;
        }
        return (MediationServiceImpl) obj;
    }

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

    public C2820j3 Y() {
        Object obj = this.f42876z.get();
        if (obj == null) {
            synchronized (this.f42876z) {
                try {
                    obj = this.f42876z.get();
                    if (obj == null) {
                        obj = new C2820j3(this);
                        this.f42876z.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.f42876z) {
            obj = null;
        }
        return (C2820j3) obj;
    }

    public void Y0() {
        if (AppLovinMediationProvider.ADMOB.equalsIgnoreCase(this.f42848l) && ((Boolean) a(C2837l4.f41119C3)).booleanValue()) {
            String str = (String) a(C2837l4.f41111B3);
            if (TextUtils.isEmpty(str)) {
                return;
            }
            StringBuilder sb2 = new StringBuilder();
            String str2 = AppLovinSdk.VERSION;
            sb2.append(str2);
            sb2.append(".");
            if (str.startsWith(sb2.toString())) {
                return;
            }
            final String a10 = b0.s.a("Mismatched AdMob adapter (", str, ") and AppLovin SDK (", str2, ") versions detected, which may cause compatibility issues.");
            C2936o.h("AppLovinSdk", a10);
            AppLovinSdkUtils.runOnUiThread(true, new Runnable() {
                @Override
                public final void run() {
                    C2932k.this.b(a10);
                }
            });
        }
    }

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

    public C2937p a0() {
        Object obj = this.f42839g0.get();
        if (obj == null) {
            synchronized (this.f42839g0) {
                try {
                    obj = this.f42839g0.get();
                    if (obj == null) {
                        obj = new C2937p(this);
                        this.f42839g0.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.f42839g0) {
            obj = null;
        }
        return (C2937p) obj;
    }

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

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

    public C2975w3 d0() {
        Object obj = this.f42819T.get();
        if (obj == null) {
            synchronized (this.f42819T) {
                try {
                    obj = this.f42819T.get();
                    if (obj == null) {
                        obj = new C2975w3(this);
                        this.f42819T.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.f42819T) {
            obj = null;
        }
        return (C2975w3) obj;
    }

    public com.applovin.impl.sdk.network.b e0() {
        Object obj = this.f42825Z.get();
        if (obj == null) {
            synchronized (this.f42825Z) {
                try {
                    obj = this.f42825Z.get();
                    if (obj == null) {
                        obj = new com.applovin.impl.sdk.network.b(this);
                        this.f42825Z.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.f42825Z) {
            obj = null;
        }
        return (com.applovin.impl.sdk.network.b) obj;
    }

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

    public r g0() {
        Object obj = this.f42800B.get();
        if (obj == null) {
            synchronized (this.f42800B) {
                try {
                    obj = this.f42800B.get();
                    if (obj == null) {
                        obj = N0();
                        if (obj == null) {
                            obj = this.f42800B;
                        }
                        this.f42800B.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.f42800B) {
            obj = null;
        }
        return (r) obj;
    }

    public String h0() {
        return w0().a();
    }

    public String i0() {
        return this.f42826a;
    }

    public MaxSegmentCollectionImpl j0() {
        return (MaxSegmentCollectionImpl) this.f42846k;
    }

    public Map k0() {
        MaxSegmentCollectionImpl j02 = j0();
        if (j02 == null) {
            return null;
        }
        return j02.getJsonData();
    }

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

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

    public AppLovinSdkSettings n0() {
        return this.f42844j;
    }

    public C2845m4 o0() {
        Object obj = this.f42872x.get();
        if (obj == null) {
            synchronized (this.f42872x) {
                try {
                    obj = this.f42872x.get();
                    if (obj == null) {
                        obj = new C2845m4(this);
                        this.f42872x.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.f42872x) {
            obj = null;
        }
        return (C2845m4) obj;
    }

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

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

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

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

    public String r() {
        return this.f42828b;
    }

    public SharedPreferencesOnSharedPreferenceChangeListenerC2847m6 r0() {
        Object obj = this.f42817R.get();
        if (obj == null) {
            synchronized (this.f42817R) {
                try {
                    obj = this.f42817R.get();
                    if (obj == null) {
                        obj = new SharedPreferencesOnSharedPreferenceChangeListenerC2847m6(this);
                        this.f42817R.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.f42817R) {
            obj = null;
        }
        return (SharedPreferencesOnSharedPreferenceChangeListenerC2847m6) obj;
    }

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

    public C2919s6 s0() {
        Object obj = this.f42845j0.get();
        if (obj == null) {
            synchronized (this.f42845j0) {
                try {
                    obj = this.f42845j0.get();
                    if (obj == null) {
                        obj = new C2919s6(this);
                        this.f42845j0.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.f42845j0) {
            obj = null;
        }
        return (C2919s6) obj;
    }

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

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

    public String toString() {
        StringBuilder sb2 = new StringBuilder("CoreSdk{sdkKey='");
        sb2.append(this.f42826a);
        sb2.append("', enabled=");
        sb2.append(this.f42859q0);
        sb2.append(", isFirstSession=");
        return androidx.recyclerview.widget.s.a(sb2, this.f42861r0, C1986b.f16268j);
    }

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

    public Activity u0() {
        Activity b10 = a(o()).b();
        return b10 != null ? b10 : J();
    }

    public String v() {
        return w0().c();
    }

    public C2986x6 v0() {
        return this.f42868v;
    }

    public SdkConfigurationImpl w() {
        return this.f42873x0;
    }

    public C2994y6 w0() {
        Object obj = this.f42803D.get();
        if (obj == null) {
            synchronized (this.f42803D) {
                try {
                    obj = this.f42803D.get();
                    if (obj == null) {
                        obj = new C2994y6(this);
                        this.f42803D.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.f42803D) {
            obj = null;
        }
        return (C2994y6) obj;
    }

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

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

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

    public AppLovinSdk y0() {
        return this.f42858q;
    }

    public C2996z0 z() {
        Object obj = this.f42818S.get();
        if (obj == null) {
            synchronized (this.f42818S) {
                try {
                    obj = this.f42818S.get();
                    if (obj == null) {
                        obj = new C2996z0(this);
                        this.f42818S.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.f42818S) {
            obj = null;
        }
        return (C2996z0) obj;
    }

    public boolean z0() {
        return this.f42863s0;
    }

    private void d() {
        C2910r5 q02 = q0();
        int i10 = this.f42865t0 + 1;
        this.f42865t0 = i10;
        q02.a((AbstractRunnableC2976w4) new C2806h5(i10, this, new a()), C2910r5.b.CORE);
    }

    public static long n() {
        return f42794F0;
    }

    public C2757c e() {
        return a(f42792D0);
    }

    public C2920a f() {
        Object obj = this.f42806G.get();
        if (obj == null) {
            synchronized (this.f42806G) {
                try {
                    obj = this.f42806G.get();
                    if (obj == null) {
                        obj = new C2920a(this);
                        this.f42806G.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.f42806G) {
            obj = null;
        }
        return (C2920a) obj;
    }

    public C2784f g() {
        return this.f42862s;
    }

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

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

    public C2808i j() {
        Object obj = this.f42827a0.get();
        if (obj == null) {
            synchronized (this.f42827a0) {
                try {
                    obj = this.f42827a0.get();
                    if (obj == null) {
                        obj = new C2808i(this);
                        this.f42827a0.set(obj);
                    }
                } finally {
                }
            }
        }
        if (obj == this.f42827a0) {
            obj = null;
        }
        return (C2808i) obj;
    }

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

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

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

    public void c(JSONObject jSONObject) {
        if (JsonUtils.isValid(jSONObject)) {
            this.f42840h = System.currentTimeMillis();
            AbstractC2874n0.c(jSONObject, this);
            AbstractC2874n0.b(jSONObject, this);
            AbstractC2874n0.a(jSONObject, this);
            AbstractC2752b3.f(jSONObject, this);
            AbstractC2752b3.d(jSONObject, this);
            AbstractC2752b3.e(jSONObject, this);
            AbstractC2752b3.g(jSONObject, this);
        }
    }

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

    public void a(AppLovinSdkInitializationConfiguration appLovinSdkInitializationConfiguration) {
        A0();
        this.f42844j.attachAppLovinSdk(this);
        String pluginVersion = appLovinSdkInitializationConfiguration.getPluginVersion();
        if (pluginVersion != null) {
            C2936o.g("AppLovinSdk", "Setting plugin version: ".concat(pluginVersion));
            o0().a(C2837l4.f41111B3, pluginVersion);
        }
        if (appLovinSdkInitializationConfiguration.isExceptionHandlerEnabled() && ((Boolean) a(C2837l4.f41431s)).booleanValue()) {
            AppLovinExceptionHandler.shared().addSdk(this);
            AppLovinExceptionHandler.shared().enable();
        }
        C2910r5 q02 = q0();
        AbstractRunnableC2976w4 abstractRunnableC2976w4 = this.f42799A0;
        C2910r5.b bVar = C2910r5.b.CORE;
        q02.a(abstractRunnableC2976w4, bVar);
        q0().a(this.f42801B0, bVar);
    }

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

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

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

    public static String a(String str, List list) {
        if (TextUtils.isEmpty(str)) {
            return "";
        }
        Context o10 = o();
        return a(o10.getResources().getIdentifier(str, "string", o10.getPackageName()), list);
    }

    public void c(String str) {
        O();
        if (C2936o.a()) {
            O().a("AppLovinSdk", str);
        }
        q0().a(new C2903q5(this));
    }

    public static String a(int i10, List list) {
        String string = o().getResources().getString(i10);
        return list != null ? String.format(string, list.toArray()) : string;
    }

    public void c() {
        synchronized (this.f42849l0) {
            try {
                if (!this.f42857p0 && !this.f42859q0) {
                    S0();
                }
            } catch (Throwable th) {
                throw th;
            }
        }
    }

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

    public static C2757c a(Context context) {
        if (f42796H0 == null) {
            synchronized (f42797I0) {
                try {
                    if (f42796H0 == null) {
                        f42796H0 = new C2757c(context);
                    }
                } finally {
                }
            }
        }
        return f42796H0;
    }

    public void b(String str) {
        if (!AbstractC3002z6.c(this)) {
            HashMap hashMap = new HashMap();
            hashMap.put("details", AppLovinMediationProvider.ADMOB);
            hashMap.put("error_message", str);
            E().a(C2989y1.f43504u0, "adapterVersionMismatch", hashMap);
            return;
        }
        throw new IllegalStateException(str);
    }

    public List c(C2837l4 c2837l4) {
        return o0().c(c2837l4);
    }

    public void c(C2878n4 c2878n4) {
        p0().b(c2878n4);
    }

    public void a(final AppLovinSdkInitializationConfiguration appLovinSdkInitializationConfiguration, final AppLovinSdk.SdkInitializationListener sdkInitializationListener) {
        synchronized (this.f42871w0) {
            try {
                if (this.f42869v0 != null) {
                    C2936o.h("AppLovinSdk", "AppLovin SDK already initialized with configuration: " + this.f42869v0 + ". Ignoring the provided initialization configuration.");
                    if (!B0() || sdkInitializationListener == null) {
                        return;
                    }
                    AppLovinSdkUtils.runOnUiThread(new Runnable() {
                        @Override
                        public final void run() {
                            C2932k.this.a(sdkInitializationListener);
                        }
                    });
                    return;
                }
                this.f42834e = System.currentTimeMillis();
                this.f42869v0 = appLovinSdkInitializationConfiguration;
                this.f42875y0 = sdkInitializationListener;
                this.f42826a = appLovinSdkInitializationConfiguration.getSdkKey();
                this.f42828b = appLovinSdkInitializationConfiguration.getAxonEventKey();
                this.f42848l = appLovinSdkInitializationConfiguration.getMediationProvider();
                this.f42846k = appLovinSdkInitializationConfiguration.getSegmentCollection();
                AbstractC3002z6.a(new Runnable() {
                    @Override
                    public final void run() {
                        C2932k.this.a(appLovinSdkInitializationConfiguration);
                    }
                });
            } catch (Throwable th) {
                throw th;
            }
        }
    }

    public void b(boolean z10) {
        final AppLovinSdk.SdkInitializationListener sdkInitializationListener;
        if (y().i() || (sdkInitializationListener = this.f42875y0) == null) {
            return;
        }
        if (B0()) {
            this.f42875y0 = null;
            this.f42877z0 = null;
            S().a(MaxAdapter.InitializationStatus.INITIALIZED_SUCCESS);
        } else {
            if (this.f42877z0 == sdkInitializationListener) {
                return;
            }
            S().a(MaxAdapter.InitializationStatus.INITIALIZED_FAILURE);
            if (((Boolean) a(C2837l4.f41407p)).booleanValue()) {
                this.f42875y0 = null;
            } else {
                this.f42877z0 = sdkInitializationListener;
            }
        }
        JSONObject jSONObject = new JSONObject();
        JsonUtils.putBoolean(jSONObject, "enabled", B0());
        JsonUtils.putBoolean(jSONObject, "timeout", z10);
        JsonUtils.putBoolean(jSONObject, "consent_flow_shown", this.f42855o0.get());
        long currentTimeMillis = System.currentTimeMillis() - this.f42834e;
        HashMap hashMap = new HashMap();
        hashMap.put("duration_ms", String.valueOf(currentTimeMillis));
        hashMap.put("details", jSONObject.toString());
        this.f42868v.d(C2989y1.f43479i, hashMap);
        AppLovinSdkUtils.runOnUiThreadDelayed(new Runnable() {
            @Override
            public final void run() {
                C2932k.this.b(sdkInitializationListener);
            }
        }, Math.max(0L, ((Long) a(C2837l4.f41415q)).longValue()));
    }

    public void a(AppLovinSdk.SdkInitializationListener sdkInitializationListener) {
        sdkInitializationListener.onSdkInitialized(this.f42873x0);
    }

    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 b(AppLovinSdk.SdkInitializationListener sdkInitializationListener) {
        O();
        if (C2936o.a()) {
            O().a("AppLovinSdk", "Calling back publisher's initialization completion handler...");
        }
        sdkInitializationListener.onSdkInitialized(this.f42873x0);
    }

    public void a(boolean z10) {
        synchronized (this.f42849l0) {
            this.f42857p0 = false;
            this.f42859q0 = z10;
        }
        if (z10) {
            List a10 = AbstractC2836l3.a(this);
            if (a10.isEmpty()) {
                q0().e();
                M0();
                return;
            }
            Long l10 = (Long) a(AbstractC2796g3.f40780K6);
            C2791f6 c2791f6 = new C2791f6(this, true, "timeoutInitAdapters", new Runnable() {
                @Override
                public final void run() {
                    C2932k.this.I0();
                }
            });
            O();
            if (C2936o.a()) {
                O().a("AppLovinSdk", "Waiting for required adapters to init: " + a10 + " - timing out in " + l10 + "ms...");
            }
            q0().a(c2791f6, C2910r5.b.TIMEOUT, l10.longValue(), true);
        }
    }

    public List b(C2837l4 c2837l4) {
        return o0().b(c2837l4);
    }

    public void b(C2878n4 c2878n4, Object obj) {
        p0().b(c2878n4, obj);
    }

    public Object b(C2878n4 c2878n4) {
        return p0().a(c2878n4);
    }

    public String b() {
        if (StringUtils.isValidString(this.f42867u0)) {
            return null;
        }
        ArrayList arrayList = new ArrayList();
        Map W10 = W();
        List c10 = c(C2837l4.f41293a4);
        Boolean bool = (Boolean) a(C2837l4.f41300b4);
        if (W10.isEmpty() && !bool.booleanValue()) {
            return null;
        }
        try {
            StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
            Integer num = (Integer) a(C2837l4.f41286Z3);
            for (StackTraceElement stackTraceElement : stackTrace) {
                if (num.intValue() <= 0) {
                    break;
                }
                String className = stackTraceElement.getClassName();
                Iterator it = c10.iterator();
                while (true) {
                    if (!it.hasNext()) {
                        break;
                    }
                    if (className.startsWith((String) it.next())) {
                        break;
                    }
                }
            }
        } catch (Throwable th) {
            E().a("AppLovinSdk", "detectMediationProvider", th);
        }
        this.f42867u0 = "unknown";
        O();
        if (C2936o.a()) {
            O().k("AppLovinSdk", "Unable to detect mediation provider");
        }
        if (arrayList.isEmpty()) {
            return null;
        }
        String join = StringUtils.join(",", arrayList);
        if (!((Boolean) a(C2837l4.f41308c4)).booleanValue()) {
            return join;
        }
        E().a(C2989y1.f43469d, "detectMediationProvider", CollectionUtils.hashMap("details", join));
        return null;
    }

    public void a(C2734a3 c2734a3) {
        if (q0().d()) {
            return;
        }
        List a10 = AbstractC2836l3.a(this);
        if (a10.size() <= 0 || !S().a().containsAll(a10)) {
            return;
        }
        O();
        if (C2936o.a()) {
            O().a("AppLovinSdk", "All required adapters initialized");
        }
        q0().e();
        M0();
    }

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

    public void a() {
        String str = (String) p0().a(C2878n4.f42099g, null);
        if (StringUtils.isValidString(str)) {
            if (AppLovinSdk.VERSION_CODE < AbstractC3002z6.g(str)) {
                C2936o.h("AppLovinSdk", "Current version (" + AppLovinSdk.VERSION + ") is older than earlier installed version (" + str + "), which may cause compatibility issues.");
            }
        }
    }

    public Object a(C2837l4 c2837l4) {
        return o0().a(c2837l4);
    }

    public boolean a(C2837l4 c2837l4, MaxAdFormat maxAdFormat) {
        return b(c2837l4).contains(maxAdFormat);
    }

    public void a(Map map) {
        U().a(map);
    }

    public void a(Uri uri) {
        C().a(uri);
    }

    public void a(String str, Object obj, SharedPreferences.Editor editor) {
        p0().a(str, obj, editor);
    }

    public Object a(C2878n4 c2878n4) {
        return a(c2878n4, (Object) null);
    }

    public Object a(C2878n4 c2878n4, Object obj) {
        return p0().a(c2878n4, obj);
    }

    public Object a(String str, Object obj, Class cls, SharedPreferences sharedPreferences) {
        return C2886o4.a(str, obj, cls, sharedPreferences);
    }

    public void a(SharedPreferences sharedPreferences) {
        p0().a(sharedPreferences);
    }
}