导航菜单

页面标题

页面副标题

Jurassic World v1.83.4 - j.java 源代码

正在查看: Jurassic World v1.83.4 应用的 j.java JAVA 源代码文件

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


package com.applovin.impl.sdk;

import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.text.TextUtils;
import android.util.Log;
import com.applovin.impl.bg;
import com.applovin.impl.ca;
import com.applovin.impl.d4;
import com.applovin.impl.d5;
import com.applovin.impl.da;
import com.applovin.impl.dd;
import com.applovin.impl.e4;
import com.applovin.impl.gc;
import com.applovin.impl.h4;
import com.applovin.impl.hr;
import com.applovin.impl.i4;
import com.applovin.impl.jm;
import com.applovin.impl.jn;
import com.applovin.impl.la;
import com.applovin.impl.ma;
import com.applovin.impl.mediation.MaxSegmentCollectionImpl;
import com.applovin.impl.mediation.MediationServiceImpl;
import com.applovin.impl.oj;
import com.applovin.impl.pb;
import com.applovin.impl.pe;
import com.applovin.impl.privacy.cmp.CmpServiceImpl;
import com.applovin.impl.qe;
import com.applovin.impl.qg;
import com.applovin.impl.qn;
import com.applovin.impl.qr;
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.sj;
import com.applovin.impl.sm;
import com.applovin.impl.tj;
import com.applovin.impl.tm;
import com.applovin.impl.u0;
import com.applovin.impl.ue;
import com.applovin.impl.uj;
import com.applovin.impl.v;
import com.applovin.impl.ve;
import com.applovin.impl.vj;
import com.applovin.impl.wh;
import com.applovin.impl.wn;
import com.applovin.impl.wp;
import com.applovin.impl.y4;
import com.applovin.impl.ye;
import com.applovin.impl.yl;
import com.applovin.impl.yp;
import com.applovin.impl.ze;
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 com.applovin.sdk.AppLovinTermsAndPrivacyPolicyFlowSettings;
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 {
    public static j v0;
    protected static Context w0;
    private static final boolean y0;
    private static volatile com.applovin.impl.q z0;
    private String a;
    private WeakReference b;
    private long d;
    private List d0;
    private AppLovinSdkSettings f;
    private MaxSegmentCollection g;
    private String h;
    private boolean h0;
    private String m0;
    private volatile AppLovinSdk n;
    private AppLovinSdkInitializationConfiguration n0;
    private AppLovinSdk.SdkInitializationListener q0;
    private AppLovinSdk.SdkInitializationListener r0;
    private static final Object A0 = new Object();
    private static final long x0 = System.currentTimeMillis();
    private final AtomicBoolean e = new AtomicBoolean();
    private final AtomicReference i = new AtomicReference();
    private final AtomicReference j = new AtomicReference();
    private final AtomicReference k = new AtomicReference();
    private final AtomicReference l = new AtomicReference();
    private final AtomicReference m = new AtomicReference();
    private final n o = new n(this);
    private final ma p = new ma(this);
    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 A = new AtomicReference();
    private final AtomicReference B = new AtomicReference();
    private final AtomicReference C = new AtomicReference();
    private final AtomicReference D = new AtomicReference();
    private final AtomicReference E = new AtomicReference();
    private final AtomicReference F = new AtomicReference();
    private final AtomicReference G = new AtomicReference();
    private final AtomicReference H = new AtomicReference();
    private final AtomicReference I = new AtomicReference();
    private final AtomicReference J = new AtomicReference();
    private final AtomicReference K = new AtomicReference();
    private final AtomicReference L = new AtomicReference();
    private final AtomicReference M = new AtomicReference();
    private final AtomicReference N = new AtomicReference();
    private final AtomicReference O = new AtomicReference();
    private final AtomicReference P = new AtomicReference();
    private final AtomicReference Q = new AtomicReference();
    private final AtomicReference R = new AtomicReference();
    private final AtomicReference S = new AtomicReference();
    private final AtomicReference T = new AtomicReference();
    private final AtomicReference U = new AtomicReference();
    private final AtomicReference V = new AtomicReference();
    private final AtomicReference W = new AtomicReference();
    private final AtomicReference X = new AtomicReference();
    private final AtomicReference Y = new AtomicReference();
    private final AtomicReference Z = new AtomicReference();
    private final AtomicReference a0 = new AtomicReference();
    private final AtomicReference b0 = new AtomicReference();
    private final AtomicReference c0 = new AtomicReference();
    private final Object e0 = new Object();
    private final AtomicBoolean f0 = new AtomicBoolean(true);
    private final AtomicBoolean g0 = new AtomicBoolean();
    private boolean i0 = false;
    private boolean j0 = false;
    private boolean k0 = false;
    private int l0 = 0;
    private final Object o0 = new Object();
    private AppLovinSdkConfiguration p0 = new SdkConfigurationImpl(null, this);
    private final AtomicBoolean s0 = new AtomicBoolean(false);
    private final yl t0 = new jn(this, true, "scheduleAdLoadIntegrationError", new Runnable() {
        @Override
        public final void run() {
            j.this.E0();
        }
    });
    private final yl u0 = new jn(this, true, "sdkInit", new Runnable() {
        @Override
        public final void run() {
            j.this.F0();
        }
    });
    private final long c = System.currentTimeMillis();

    class a implements h4.c {
        a() {
        }

        @Override
        public void a(h4.b bVar) {
        }
    }

    class c implements jm.b {
        c() {
        }

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

    static {
        try {
            AppLovinSdkUtils.runOnUiThread(new Runnable() {
                @Override
                public final void run() {
                    yp.c();
                }
            });
            y0 = true;
        } catch (Throwable unused) {
            y0 = false;
        }
    }

    public j(Context context) {
        this.h0 = false;
        this.f = new AppLovinSdkSettings(context);
        this.h0 = true;
        if (!y0()) {
            throw new RuntimeException("As of version 12.0.0, the AppLovin MAX SDK requires Java 8. For more information visit our docs: https://developers.applovin.com/en/android/overview/integration");
        }
        w0 = context.getApplicationContext();
        if (context instanceof Activity) {
            this.b = new WeakReference((Activity) context);
        }
        if (v0 == null) {
            v0 = this;
        } else {
            n.h("AppLovinSdk", "Multiple SDK instances detected");
        }
    }

    public void C0() {
        if (j0().d()) {
            return;
        }
        J();
        if (n.a()) {
            J().a("AppLovinSdk", "Timing out adapters init...");
        }
        j0().e();
        J0();
    }

    public void D0() {
        tm j0 = j0();
        int i = this.l0 + 1;
        this.l0 = i;
        j0.a((yl) new jm(i, this, new c()), tm.b.CORE);
    }

    public void E0() {
        if (A0()) {
            pb.b(this);
        }
    }

    public void F0() {
        synchronized (this.e0) {
            boolean a2 = e4.a(l());
            if (!((Boolean) a(sj.p3)).booleanValue() || a2) {
                P0();
            }
            if (((Boolean) a(sj.o3)).booleanValue() && !a2) {
                J();
                if (n.a()) {
                    J().d("AppLovinSdk", "SDK initialized with no internet connection - listening for connection");
                }
                Q0();
            }
            if (u().e() == i4.a.TERMS) {
                if (A0()) {
                    J();
                    if (n.a()) {
                        J().a("AppLovinSdk", "MAX mediation detected... Generating consent flow...");
                    }
                    u().a();
                    u().b(n0(), new a());
                } else {
                    J();
                    if (n.a()) {
                        J().a("AppLovinSdk", "non-MAX mediation detected, mediation provider is: " + this.h);
                    }
                }
            }
        }
    }

    public void G0() {
        if (w0()) {
            return;
        }
        this.t0.run();
    }

    public void H0() {
        if (w0()) {
            return;
        }
        this.s0.set(true);
        this.u0.run();
    }

    public void I0() {
        c(uj.H);
    }

    private q K0() {
        if (!wh.f(w0)) {
            return null;
        }
        try {
            return new q(this);
        } catch (Throwable th) {
            n.b("AppLovinSdk", "Failed to initialize Privacy Sandbox Service", th);
            return null;
        }
    }

    public void L0() {
        Long l = (Long) a(sj.x3);
        if (l.longValue() >= 0 && this.e.compareAndSet(false, true)) {
            hr.a(l.longValue(), false, this, new Runnable() {
                @Override
                public final void run() {
                    j.this.D0();
                }
            });
        }
    }

    private void N0() {
        Context context = w0;
        n J = J();
        vj i0 = i0();
        h4 u = u();
        a(context);
        f0();
        h();
        m();
        V();
        L().a(MaxAdapter.InitializationStatus.INITIALIZING);
        NativeCrashReporter.a(this);
        if (TextUtils.isEmpty(this.a)) {
            n.h("AppLovinSdk", "Unable to find AppLovin SDK key. Please add  meta-data android:name=\"applovin.sdk.key\" android:value=\"YOUR_SDK_KEY_HERE\" into AndroidManifest.xml.");
            n.h("AppLovinSdk", "Called with an invalid SDK key from: " + Log.getStackTraceString(new Throwable("")));
        }
        if (this.a.length() != 86 && yp.c(this)) {
            n.h("AppLovinSdk", "Please double-check that you entered your SDK key correctly (" + this.a + ") : " + Log.getStackTraceString(new Throwable("")));
        }
        if ("HSrCHRtOan6wp2kwOIGJC1RDtuSrF2mWVbio2aBcMHX9KF3iTJ1lLSzCKP1ZSo5yNolPNw1kCTtWpxELFF4ah1".equalsIgnoreCase(this.a)) {
            n.h("AppLovinSdk", "Cross Promo SDK has been deprecated and is no longer supported");
            if (yp.c(this)) {
                throw new RuntimeException("Cross Promo SDK has been deprecated and is no longer supported");
            }
            return;
        }
        if (yp.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 (!yp.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 (yp.k(context)) {
            this.f.setVerboseLogging(true);
        }
        h0().a(sj.l, Boolean.valueOf(this.f.isVerboseLoggingEnabled()));
        SharedPreferences defaultSharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);
        uj ujVar = uj.c;
        if (TextUtils.isEmpty((String) i0.a(ujVar, (Object) null, defaultSharedPreferences))) {
            this.j0 = true;
            i0.b(ujVar, Boolean.toString(true), defaultSharedPreferences);
        } else {
            i0.b(ujVar, Boolean.toString(false), defaultSharedPreferences);
        }
        uj ujVar2 = uj.d;
        if (((Boolean) i0.a(ujVar2, Boolean.FALSE)).booleanValue()) {
            if (n.a()) {
                J.a("AppLovinSdk", "Initializing SDK for non-maiden launch");
            }
            this.k0 = true;
        } else {
            if (n.a()) {
                J.a("AppLovinSdk", "Initializing SDK for maiden launch");
            }
            i0.b(ujVar2, Boolean.TRUE);
            i0.b(uj.o, Boolean.valueOf(u.k()));
        }
        uj ujVar3 = uj.e;
        String str = (String) i0.a(ujVar3, null);
        if (StringUtils.isValidString(str)) {
            if (AppLovinSdk.VERSION_CODE > yp.f(str)) {
                i0.b(ujVar3, AppLovinSdk.VERSION);
            }
        } else {
            i0.b(ujVar3, AppLovinSdk.VERSION);
        }
        E().a(la.e, (Object) null, (Map) null, 0L);
    }

    public void O0() {
        N0();
        if (this.f.isExceptionHandlerEnabled() && ((Boolean) a(sj.u)).booleanValue()) {
            AppLovinExceptionHandler.shared().addSdk(this);
            AppLovinExceptionHandler.shared().enable();
        }
        int parseInt = StringUtils.parseInt(this.f.getExtraParameters().get("initialization_delay_ms"), ((Integer) a(sj.r4)).intValue());
        tm j0 = j0();
        jn jnVar = new jn(this, true, "scheduleAdLoadIntegrationErrorAuto", new Runnable() {
            @Override
            public final void run() {
                j.this.G0();
            }
        });
        tm.b bVar = tm.b.CORE;
        long j = parseInt;
        j0.a(jnVar, bVar, j);
        j0().a(new jn(this, true, "scheduleSdkInit", new Runnable() {
            @Override
            public final void run() {
                j.this.H0();
            }
        }), bVar, j);
    }

    private Map P() {
        try {
            return JsonUtils.toStringMap(new JSONObject((String) a(sj.s4)));
        } catch (JSONException unused) {
            return Collections.emptyMap();
        }
    }

    public void Q0() {
        bg V = V();
        V.a(new d(V));
    }

    public static long k() {
        return x0;
    }

    public static Context l() {
        return w0;
    }

    public static boolean y0() {
        return y0;
    }

    public EventServiceImpl A() {
        Object obj = this.k.get();
        if (obj == null) {
            synchronized (this.k) {
                obj = this.k.get();
                if (obj == null) {
                    obj = new EventServiceImpl(this);
                    this.k.set(obj);
                }
            }
        }
        if (obj == this.k) {
            obj = null;
        }
        return (EventServiceImpl) obj;
    }

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

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

    public boolean B0() {
        return yp.a("com.unity3d.player.UnityPlayerActivity");
    }

    public m C() {
        Object obj = this.E.get();
        if (obj == null) {
            synchronized (this.E) {
                obj = this.E.get();
                if (obj == null) {
                    obj = new m(this);
                    this.E.set(obj);
                }
            }
        }
        if (obj == this.E) {
            obj = null;
        }
        return (m) obj;
    }

    public Activity G() {
        WeakReference weakReference = this.b;
        if (weakReference != null) {
            return (Activity) weakReference.get();
        }
        return null;
    }

    public AppLovinSdkInitializationConfiguration H() {
        return this.n0;
    }

    public long I() {
        return this.c;
    }

    public n J() {
        return this.o;
    }

    public void J0() {
        final AppLovinSdk.SdkInitializationListener sdkInitializationListener;
        if ((u().j() && u().e() == i4.a.UNIFIED) || (sdkInitializationListener = this.q0) == null) {
            return;
        }
        if (u0()) {
            this.q0 = null;
            this.r0 = null;
            L().a(MaxAdapter.InitializationStatus.INITIALIZED_SUCCESS);
        } else {
            if (this.r0 == sdkInitializationListener) {
                return;
            }
            L().a(MaxAdapter.InitializationStatus.INITIALIZED_FAILURE);
            if (((Boolean) a(sj.r)).booleanValue()) {
                this.q0 = null;
            } else {
                this.r0 = sdkInitializationListener;
            }
        }
        AppLovinSdkUtils.runOnUiThreadDelayed(new Runnable() {
            @Override
            public final void run() {
                j.this.d(sdkInitializationListener);
            }
        }, Math.max(0L, ((Long) a(sj.s)).longValue()));
    }

    public com.applovin.impl.mediation.d K() {
        Object obj = this.b0.get();
        if (obj == null) {
            synchronized (this.b0) {
                obj = this.b0.get();
                if (obj == null) {
                    obj = new com.applovin.impl.mediation.d(this);
                    this.b0.set(obj);
                }
            }
        }
        if (obj == this.b0) {
            obj = null;
        }
        return (com.applovin.impl.mediation.d) obj;
    }

    public com.applovin.impl.mediation.e L() {
        Object obj = this.V.get();
        if (obj == null) {
            synchronized (this.V) {
                obj = this.V.get();
                if (obj == null) {
                    obj = new com.applovin.impl.mediation.e(this);
                    this.V.set(obj);
                }
            }
        }
        if (obj == this.V) {
            obj = null;
        }
        return (com.applovin.impl.mediation.e) obj;
    }

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

    public void M0() {
        p().a();
    }

    public String O() {
        String str = (String) a(uj.H);
        return StringUtils.isValidString(str) ? str : this.h;
    }

    public void P0() {
        synchronized (this.e0) {
            this.h0 = true;
            j0().f();
            d();
        }
    }

    public MediationServiceImpl Q() {
        Object obj = this.W.get();
        if (obj == null) {
            synchronized (this.W) {
                obj = this.W.get();
                if (obj == null) {
                    obj = new MediationServiceImpl(this);
                    this.W.set(obj);
                }
            }
        }
        if (obj == this.W) {
            obj = null;
        }
        return (MediationServiceImpl) obj;
    }

    public void R0() {
        n.h("AppLovinSdk", "Resetting SDK state...");
        da D = D();
        ca caVar = ca.l;
        long b2 = D.b(caVar);
        h0().a();
        h0().e();
        D().a();
        D().b(caVar, b2 + 1);
        if (this.f0.compareAndSet(true, false)) {
            P0();
        } else {
            this.f0.set(true);
        }
    }

    public void S0() {
        if (StringUtils.isValidString(this.m0)) {
            return;
        }
        this.m0 = AppLovinMediationProvider.MAX;
        J();
        if (n.a()) {
            J().a("AppLovinSdk", "Detected mediation provider: MAX");
        }
    }

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

    public void T0() {
        w().n();
    }

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

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

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

    public PostbackServiceImpl Y() {
        Object obj = this.R.get();
        if (obj == null) {
            synchronized (this.R) {
                obj = this.R.get();
                if (obj == null) {
                    obj = new PostbackServiceImpl(this);
                    this.R.set(obj);
                }
            }
        }
        if (obj == this.R) {
            obj = null;
        }
        return (PostbackServiceImpl) obj;
    }

    public q Z() {
        Object obj = this.w.get();
        if (obj == null) {
            synchronized (this.w) {
                obj = this.w.get();
                if (obj == null) {
                    obj = K0();
                    if (obj == null) {
                        obj = this.w;
                    }
                    this.w.set(obj);
                }
            }
        }
        if (obj == this.w) {
            obj = null;
        }
        return (q) obj;
    }

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

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

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

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

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

    public com.applovin.impl.sdk.c g() {
        Object obj = this.A.get();
        if (obj == null) {
            synchronized (this.A) {
                obj = this.A.get();
                if (obj == null) {
                    obj = new com.applovin.impl.sdk.c(this);
                    this.A.set(obj);
                }
            }
        }
        if (obj == this.A) {
            obj = null;
        }
        return (com.applovin.impl.sdk.c) obj;
    }

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

    public AppLovinAdServiceImpl i() {
        Object obj = this.i.get();
        if (obj == null) {
            synchronized (this.i) {
                obj = this.i.get();
                if (obj == null) {
                    obj = new AppLovinAdServiceImpl(this);
                    this.i.set(obj);
                }
            }
        }
        if (obj == this.i) {
            obj = null;
        }
        return (AppLovinAdServiceImpl) obj;
    }

    public e j() {
        Object obj = this.F.get();
        if (obj == null) {
            synchronized (this.F) {
                obj = this.F.get();
                if (obj == null) {
                    obj = new e(this);
                    this.F.set(obj);
                }
            }
        }
        if (obj == this.F) {
            obj = null;
        }
        return (e) obj;
    }

    public ArrayService m() {
        Object obj = this.P.get();
        if (obj == null) {
            synchronized (this.P) {
                obj = this.P.get();
                if (obj == null) {
                    obj = new ArrayService(this);
                    this.P.set(obj);
                }
            }
        }
        if (obj == this.P) {
            obj = null;
        }
        return (ArrayService) obj;
    }

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

    public f n() {
        Object obj = this.K.get();
        if (obj == null) {
            synchronized (this.K) {
                obj = this.K.get();
                if (obj == null) {
                    obj = new f(this);
                    this.K.set(obj);
                }
            }
        }
        if (obj == this.K) {
            obj = null;
        }
        return (f) obj;
    }

    public Activity n0() {
        Activity b2 = a(l()).b();
        return b2 != null ? b2 : G();
    }

    public CmpServiceImpl o() {
        Object obj = this.m.get();
        if (obj == null) {
            synchronized (this.m) {
                obj = this.m.get();
                if (obj == null) {
                    obj = new CmpServiceImpl(this);
                    this.m.set(obj);
                }
            }
        }
        if (obj == this.m) {
            obj = null;
        }
        return (CmpServiceImpl) obj;
    }

    public String o0() {
        return q0().c();
    }

    public g p() {
        Object obj = this.I.get();
        if (obj == null) {
            synchronized (this.I) {
                obj = this.I.get();
                if (obj == null) {
                    obj = new g(this);
                    this.I.set(obj);
                }
            }
        }
        if (obj == this.I) {
            obj = null;
        }
        return (g) obj;
    }

    public UserServiceImpl p0() {
        Object obj = this.l.get();
        if (obj == null) {
            synchronized (this.l) {
                obj = this.l.get();
                if (obj == null) {
                    obj = new UserServiceImpl(this);
                    this.l.set(obj);
                }
            }
        }
        if (obj == this.l) {
            obj = null;
        }
        return (UserServiceImpl) obj;
    }

    public String q() {
        return q0().b();
    }

    public AppLovinSdkConfiguration r() {
        return this.p0;
    }

    public AppLovinSdk s0() {
        return this.n;
    }

    public i t() {
        Object obj = this.y.get();
        if (obj == null) {
            synchronized (this.y) {
                obj = this.y.get();
                if (obj == null) {
                    obj = new i(this);
                    this.y.set(obj);
                }
            }
        }
        if (obj == this.y) {
            obj = null;
        }
        return (i) obj;
    }

    public boolean t0() {
        return this.k0;
    }

    public String toString() {
        return "CoreSdk{sdkKey='" + this.a + "', enabled=" + this.i0 + ", isFirstSession=" + this.j0 + '}';
    }

    public boolean u0() {
        boolean z;
        synchronized (this.e0) {
            z = this.i0;
        }
        return z;
    }

    public AppLovinTermsAndPrivacyPolicyFlowSettings v() {
        return g0().getBackingConsentFlowSettings();
    }

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

    public boolean w0() {
        boolean z;
        synchronized (this.o0) {
            z = this.n0 != null;
        }
        return z;
    }

    public boolean x0() {
        boolean z;
        synchronized (this.e0) {
            z = this.h0;
        }
        return z;
    }

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

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

    public AtomicBoolean z0() {
        return this.s0;
    }

    private void d() {
        tm j0 = j0();
        int i = this.l0 + 1;
        this.l0 = i;
        j0.a((yl) new jm(i, this, new b()), tm.b.CORE);
    }

    public com.applovin.impl.q e() {
        return a(w0);
    }

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

    public void g(final String str) {
        J();
        if (n.a()) {
            J().a("AppLovinSdk", "Setting user id: " + str);
        }
        if (StringUtils.isValidString(str) && str.length() > yp.b(8)) {
            n.h("AppLovinSdk", "Provided user id longer than supported (" + str.length() + " bytes, " + yp.b(8) + " maximum)");
        }
        if (yp.h()) {
            yp.a(new Runnable() {
                @Override
                public final void run() {
                    j.this.c(str);
                }
            });
        } else {
            q0().a(str);
        }
    }

    public void d(String str) {
        J();
        if (n.a()) {
            J().a("AppLovinSdk", str);
        }
        j0().a(new sm(this));
    }

    public void e(String str) {
        J();
        if (n.a()) {
            J().a("AppLovinSdk", "setMediationProvider(mediationProvider=" + str + ")");
        }
        if (str != null && (str.isEmpty() || str.length() > 64 || !StringUtils.isAlphaNumeric(str))) {
            n.h("AppLovinSdk", "Mediation provider set to invalid value: " + str + ". Please use a valid mediation provider (e.g., AppLovinMediationProvider.MAX)");
            return;
        }
        this.h = str;
        if (yp.h()) {
            yp.a(new Runnable() {
                @Override
                public final void run() {
                    j.this.I0();
                }
            });
        } else {
            c(uj.H);
        }
    }

    public void f(final String str) {
        n.g("AppLovinSdk", "Setting plugin version: " + str);
        if (yp.h()) {
            yp.a(new Runnable() {
                @Override
                public final void run() {
                    j.this.b(str);
                }
            });
        } else {
            h0().a(sj.U3, str);
        }
    }

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

    public ma E() {
        return this.p;
    }

    public tm j0() {
        Object obj = this.q.get();
        if (obj == null) {
            synchronized (this.q) {
                obj = this.q.get();
                if (obj == null) {
                    obj = new tm(this);
                    this.q.set(obj);
                }
            }
        }
        if (obj == this.q) {
            obj = null;
        }
        return (tm) obj;
    }

    public tj h0() {
        Object obj = this.r.get();
        if (obj == null) {
            synchronized (this.r) {
                obj = this.r.get();
                if (obj == null) {
                    obj = new tj(this);
                    this.r.set(obj);
                }
            }
        }
        if (obj == this.r) {
            obj = null;
        }
        return (tj) obj;
    }

    public d4 s() {
        Object obj = this.s.get();
        if (obj == null) {
            synchronized (this.s) {
                obj = this.s.get();
                if (obj == null) {
                    obj = new d4(this);
                    this.s.set(obj);
                }
            }
        }
        if (obj == this.s) {
            obj = null;
        }
        return (d4) obj;
    }

    public da D() {
        Object obj = this.t.get();
        if (obj == null) {
            synchronized (this.t) {
                obj = this.t.get();
                if (obj == null) {
                    obj = new da(this);
                    this.t.set(obj);
                }
            }
        }
        if (obj == this.t) {
            obj = null;
        }
        return (da) obj;
    }

    public ye R() {
        Object obj = this.u.get();
        if (obj == null) {
            synchronized (this.u) {
                obj = this.u.get();
                if (obj == null) {
                    obj = new ye(this);
                    this.u.set(obj);
                }
            }
        }
        if (obj == this.u) {
            obj = null;
        }
        return (ye) obj;
    }

    public vj i0() {
        Object obj = this.x.get();
        if (obj == null) {
            synchronized (this.x) {
                obj = this.x.get();
                if (obj == null) {
                    obj = new vj(this);
                    this.x.set(obj);
                }
            }
        }
        if (obj == this.x) {
            obj = null;
        }
        return (vj) obj;
    }

    public wp q0() {
        Object obj = this.z.get();
        if (obj == null) {
            synchronized (this.z) {
                obj = this.z.get();
                if (obj == null) {
                    obj = new wp(this);
                    this.z.set(obj);
                }
            }
        }
        if (obj == this.z) {
            obj = null;
        }
        return (wp) obj;
    }

    public qr r0() {
        Object obj = this.G.get();
        if (obj == null) {
            synchronized (this.G) {
                obj = this.G.get();
                if (obj == null) {
                    obj = new qr(this);
                    this.G.set(obj);
                }
            }
        }
        if (obj == this.G) {
            obj = null;
        }
        return (qr) obj;
    }

    public bg V() {
        Object obj = this.H.get();
        if (obj == null) {
            synchronized (this.H) {
                obj = this.H.get();
                if (obj == null) {
                    obj = new bg(l());
                    this.H.set(obj);
                }
            }
        }
        if (obj == this.H) {
            obj = null;
        }
        return (bg) obj;
    }

    public oj e0() {
        Object obj = this.J.get();
        if (obj == null) {
            synchronized (this.J) {
                obj = this.J.get();
                if (obj == null) {
                    obj = new oj(this);
                    this.J.set(obj);
                }
            }
        }
        if (obj == this.J) {
            obj = null;
        }
        return (oj) obj;
    }

    public h4 u() {
        Object obj = this.L.get();
        if (obj == null) {
            synchronized (this.L) {
                obj = this.L.get();
                if (obj == null) {
                    obj = new h4(this);
                    this.L.set(obj);
                }
            }
        }
        if (obj == this.L) {
            obj = null;
        }
        return (h4) obj;
    }

    public qn k0() {
        Object obj = this.M.get();
        if (obj == null) {
            synchronized (this.M) {
                obj = this.M.get();
                if (obj == null) {
                    obj = new qn(this);
                    this.M.set(obj);
                }
            }
        }
        if (obj == this.M) {
            obj = null;
        }
        return (qn) obj;
    }

    public y4 w() {
        Object obj = this.N.get();
        if (obj == null) {
            synchronized (this.N) {
                obj = this.N.get();
                if (obj == null) {
                    obj = new y4(this);
                    this.N.set(obj);
                }
            }
        }
        if (obj == this.N) {
            obj = null;
        }
        return (y4) obj;
    }

    public qg W() {
        Object obj = this.O.get();
        if (obj == null) {
            synchronized (this.O) {
                obj = this.O.get();
                if (obj == null) {
                    obj = new qg(this);
                    this.O.set(obj);
                }
            }
        }
        if (obj == this.O) {
            obj = null;
        }
        return (qg) obj;
    }

    public d5 x() {
        Object obj = this.Q.get();
        if (obj == null) {
            synchronized (this.Q) {
                obj = this.Q.get();
                if (obj == null) {
                    obj = new d5(this);
                    this.Q.set(obj);
                }
            }
        }
        if (obj == this.Q) {
            obj = null;
        }
        return (d5) obj;
    }

    public v h() {
        Object obj = this.T.get();
        if (obj == null) {
            synchronized (this.T) {
                obj = this.T.get();
                if (obj == null) {
                    obj = new v(this);
                    this.T.set(obj);
                }
            }
        }
        if (obj == this.T) {
            obj = null;
        }
        return (v) obj;
    }

    public dd F() {
        Object obj = this.X.get();
        if (obj == null) {
            synchronized (this.X) {
                obj = this.X.get();
                if (obj == null) {
                    obj = new dd(this);
                    this.X.set(obj);
                }
            }
        }
        if (obj == this.X) {
            obj = null;
        }
        return (dd) obj;
    }

    public ze S() {
        Object obj = this.Y.get();
        if (obj == null) {
            synchronized (this.Y) {
                obj = this.Y.get();
                if (obj == null) {
                    obj = new ze();
                    this.Y.set(obj);
                }
            }
        }
        if (obj == this.Y) {
            obj = null;
        }
        return (ze) obj;
    }

    public ue N() {
        Object obj = this.Z.get();
        if (obj == null) {
            synchronized (this.Z) {
                obj = this.Z.get();
                if (obj == null) {
                    obj = new ue(this);
                    this.Z.set(obj);
                }
            }
        }
        if (obj == this.Z) {
            obj = null;
        }
        return (ue) obj;
    }

    public wn l0() {
        Object obj = this.c0.get();
        if (obj == null) {
            synchronized (this.c0) {
                obj = this.c0.get();
                if (obj == null) {
                    obj = new wn(this);
                    this.c0.set(obj);
                }
            }
        }
        if (obj == this.c0) {
            obj = null;
        }
        return (wn) obj;
    }

    class b implements jm.b {
        b() {
        }

        @Override
        public void a(JSONObject jSONObject) {
            boolean z = jSONObject != null && jSONObject.length() > 0;
            j.this.c(jSONObject);
            u0.b(j.this);
            e4.a(jSONObject, z, j.this);
            j.this.N().a(JsonUtils.getBoolean(jSONObject, "smd", Boolean.FALSE).booleanValue(), JsonUtils.getInt(jSONObject, "smd_delay_sec", 2));
            j.this.E().a();
            j jVar = j.this;
            jVar.d0 = jVar.a(jSONObject);
            if (z) {
                List<String> explode = CollectionUtils.explode(JsonUtils.getString(jSONObject, "eaaui", ""));
                j jVar2 = j.this;
                jVar2.p0 = new SdkConfigurationImpl(explode, jVar2);
            }
            j.this.l0().a(jSONObject);
            j.this.b(jSONObject);
            gc.b(((Boolean) j.this.a(sj.h6)).booleanValue());
            gc.a(((Boolean) j.this.a(sj.i6)).booleanValue());
            if (!j.this.A0()) {
                j.this.d("Initializing SDK in non-MAX environment...");
            } else if (j.this.u().e() == i4.a.UNIFIED) {
                Activity n0 = j.this.n0();
                if (j.this.g0.compareAndSet(false, true)) {
                    j.this.u().a();
                    j.this.u().b(n0, new a());
                } else {
                    j.this.d("Initializing SDK in MAX environment...");
                }
            } else {
                j.this.d("Initializing SDK in MAX environment...");
            }
            if (!((Boolean) j.this.a(sj.o3)).booleanValue() || z || !e4.a(j.l())) {
                j.this.L0();
                return;
            }
            j.this.J();
            if (n.a()) {
                j.this.J().d("AppLovinSdk", "SDK initialized with no internet connection - listening for connection");
            }
            j.this.Q0();
        }

        class a implements h4.c {
            a() {
            }

            @Override
            public void a(h4.b bVar) {
                j.this.J();
                if (n.a()) {
                    j.this.J().a("AppLovinSdk", "Unified flow completed with status: " + bVar);
                }
                if (bVar.b()) {
                    j.this.J();
                    if (n.a()) {
                        j.this.J().a("AppLovinSdk", "Re-initializing SDK with the updated privacy settings...");
                    }
                    j.this.P0();
                    j.this.M0();
                    return;
                }
                j.this.d("Initializing SDK in MAX environment...");
            }
        }
    }

    class d implements bg.a {
        final bg a;

        @Override
        public void a() {
            j.this.J();
            if (n.a()) {
                j.this.J().d("AppLovinSdk", "Connected to internet - re-initializing SDK");
            }
            synchronized (j.this.e0) {
                if (!j.this.h0) {
                    j.this.P0();
                }
            }
            this.a.b(this);
        }

        @Override
        public void b() {
        }

        d(bg bgVar) {
            this.a = bgVar;
        }
    }

    public List c(sj sjVar) {
        return h0().c(sjVar);
    }

    public boolean a(sj sjVar, String str) {
        Iterator it = c(sjVar).iterator();
        while (it.hasNext()) {
            if (((String) it.next()).equalsIgnoreCase(str)) {
                return true;
            }
        }
        return false;
    }

    public List b(sj sjVar) {
        return h0().b(sjVar);
    }

    public Object a(sj sjVar) {
        return h0().a(sjVar);
    }

    public void c(uj ujVar) {
        i0().b(ujVar);
    }

    public void c(JSONObject jSONObject) {
        this.d = System.currentTimeMillis();
        e4.c(jSONObject, this);
        e4.b(jSONObject, this);
        e4.a(jSONObject, this);
        qe.f(jSONObject, this);
        qe.d(jSONObject, this);
        qe.e(jSONObject, this);
        qe.g(jSONObject, this);
    }

    public void c() {
        synchronized (this.e0) {
            if (!this.h0 && !this.i0) {
                P0();
            }
        }
    }

    public void c(AppLovinSdk.SdkInitializationListener sdkInitializationListener) {
        sdkInitializationListener.onSdkInitialized(this.p0);
    }

    public void c(String str) {
        q0().a(str);
    }

    public Object b(uj ujVar) {
        return i0().a(ujVar);
    }

    public Object a(uj ujVar) {
        return a(ujVar, (Object) null);
    }

    public void b(uj ujVar, Object obj) {
        i0().b(ujVar, obj);
    }

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

    public void b(AppLovinSdk.SdkInitializationListener sdkInitializationListener) {
        sdkInitializationListener.onSdkInitialized(this.p0);
    }

    public void a(AppLovinSdkInitializationConfiguration appLovinSdkInitializationConfiguration) {
        N0();
        this.f.attachAppLovinSdk(this);
        String pluginVersion = appLovinSdkInitializationConfiguration.getPluginVersion();
        if (pluginVersion != null) {
            n.g("AppLovinSdk", "Setting plugin version: " + pluginVersion);
            h0().a(sj.U3, pluginVersion);
        }
        if (appLovinSdkInitializationConfiguration.isExceptionHandlerEnabled() && ((Boolean) a(sj.u)).booleanValue()) {
            AppLovinExceptionHandler.shared().addSdk(this);
            AppLovinExceptionHandler.shared().enable();
        }
        tm j0 = j0();
        yl ylVar = this.t0;
        tm.b bVar = tm.b.CORE;
        j0.a(ylVar, bVar);
        j0().a(this.u0, bVar);
    }

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

    public java.lang.String b() {
        throw new UnsupportedOperationException("Method not decompiled: com.applovin.impl.sdk.j.b():java.lang.String");
    }

    public void b(String str) {
        h0().a(sj.U3, str);
    }

    public Object a(uj ujVar, Object obj) {
        return i0().a(ujVar, obj);
    }

    public boolean a(sj sjVar, MaxAdFormat maxAdFormat) {
        return b(sjVar).contains(maxAdFormat);
    }

    public void a(pe peVar) {
        if (j0().d()) {
            return;
        }
        List c2 = c(ve.G6);
        if (c2.size() <= 0 || !L().a().containsAll(c2)) {
            return;
        }
        J();
        if (n.a()) {
            J().a("AppLovinSdk", "All required adapters initialized");
        }
        j0().e();
        J0();
    }

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

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

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

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

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

    public static com.applovin.impl.q a(Context context) {
        if (z0 == null) {
            synchronized (A0) {
                if (z0 == null) {
                    z0 = new com.applovin.impl.q(context);
                }
            }
        }
        return z0;
    }

    public void a(final AppLovinSdkInitializationConfiguration appLovinSdkInitializationConfiguration, final AppLovinSdk.SdkInitializationListener sdkInitializationListener) {
        if (this.s0.get()) {
            n.h("AppLovinSdk", "Invalid initialization process. Please initialize the SDK as soon as possible with \"AppLovinSdk#initialize(AppLovinSdkInitializationConfiguration, AppLovinSdk.SdkInitializationListener)\" before accessing any SDK fields or functions");
            E().a(la.L, "legacy_init_already");
            if (yp.c(this)) {
                throw new IllegalStateException("Invalid initialization process. Please initialize the SDK as soon as possible with \"AppLovinSdk#initialize(AppLovinSdkInitializationConfiguration, AppLovinSdk.SdkInitializationListener)\" before accessing any SDK fields or functions");
            }
            return;
        }
        synchronized (this.o0) {
            if (this.n0 != null) {
                if (!u0() || sdkInitializationListener == null) {
                    return;
                }
                AppLovinSdkUtils.runOnUiThread(new Runnable() {
                    @Override
                    public final void run() {
                        j.this.b(sdkInitializationListener);
                    }
                });
                return;
            }
            this.n0 = appLovinSdkInitializationConfiguration;
            this.q0 = sdkInitializationListener;
            this.a = appLovinSdkInitializationConfiguration.getSdkKey();
            this.h = appLovinSdkInitializationConfiguration.getMediationProvider();
            this.g = appLovinSdkInitializationConfiguration.getSegmentCollection();
            yp.a(new Runnable() {
                @Override
                public final void run() {
                    j.this.a(appLovinSdkInitializationConfiguration);
                }
            });
        }
    }

    public void a(String str, AppLovinSdkSettings appLovinSdkSettings) {
        z0().set(true);
        this.a = str;
        this.f = appLovinSdkSettings;
        yp.a(new Runnable() {
            @Override
            public final void run() {
                j.this.O0();
            }
        });
    }

    public List a(JSONObject jSONObject) {
        List asList = Arrays.asList(JsonUtils.getString(jSONObject, "eaf", "").split(","));
        ArrayList arrayList = new ArrayList(asList.size());
        Iterator it = asList.iterator();
        while (it.hasNext()) {
            MaxAdFormat formatFromString = MaxAdFormat.formatFromString((String) it.next());
            if (formatFromString != null) {
                arrayList.add(formatFromString);
            }
        }
        return arrayList;
    }

    public void a(boolean z) {
        synchronized (this.e0) {
            this.h0 = false;
            this.i0 = z;
        }
        if (z) {
            List c2 = c(ve.G6);
            if (c2.isEmpty()) {
                j0().e();
                J0();
                return;
            }
            Long l = (Long) a(ve.H6);
            jn jnVar = new jn(this, true, "timeoutInitAdapters", new Runnable() {
                @Override
                public final void run() {
                    j.this.C0();
                }
            });
            J();
            if (n.a()) {
                J().a("AppLovinSdk", "Waiting for required adapters to init: " + c2 + " - timing out in " + l + "ms...");
            }
            j0().a(jnVar, tm.b.TIMEOUT, l.longValue(), true);
        }
    }

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

    public void a() {
        String str = (String) i0().a(uj.e, null);
        if (StringUtils.isValidString(str)) {
            if (AppLovinSdk.VERSION_CODE < yp.f(str)) {
                n.h("AppLovinSdk", "Current version (" + AppLovinSdk.VERSION + ") is older than earlier installed version (" + str + "), which may cause compatibility issues.");
            }
        }
    }

    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(String str, Object obj, Class cls, SharedPreferences sharedPreferences) {
        return vj.a(str, obj, cls, sharedPreferences);
    }

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

    public void a(long j) {
        t().b(j);
    }

    public void a(final AppLovinSdk.SdkInitializationListener sdkInitializationListener) {
        if (!u0()) {
            this.q0 = sdkInitializationListener;
        } else if (sdkInitializationListener != null) {
            AppLovinSdkUtils.runOnUiThread(new Runnable() {
                @Override
                public final void run() {
                    j.this.c(sdkInitializationListener);
                }
            });
        }
    }
}