CONECTA PRO v4.2.8版本的 MD5 值为:ad88cf9e66d8cdaae8c40233e50eb389

以下内容为反编译后的 x4.java 源代码,内容仅作参考


package i5;

import android.app.Application;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.Bundle;
import android.os.RemoteException;
import android.os.SystemClock;
import android.text.TextUtils;
import android.util.Pair;
import com.google.android.gms.internal.measurement.b9;
import com.google.android.gms.internal.measurement.l9;
import com.google.android.gms.internal.measurement.m9;
import java.io.Serializable;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.concurrent.atomic.AtomicInteger;
public final class x4 implements i5 {
    public static volatile x4 Z;
    public final t4 A;
    public final x6 B;
    public final m7 C;
    public final a4 D;
    public final u4.l E;
    public final j6 F;
    public final p5 G;
    public final r H;
    public final d6 I;
    public final String J;
    public y3 K;
    public m6 L;
    public s M;
    public z3 N;
    public Boolean P;
    public long Q;
    public volatile Boolean R;
    public final Boolean S;
    public final Boolean T;
    public volatile boolean U;
    public int V;
    public int W;
    public final long Y;
    public final Context f5812r;
    public final String f5813s;
    public final String f5814t;
    public final String f5815u;
    public final boolean f5816v;
    public final com.google.android.gms.internal.measurement.z4 f5817w;
    public final f f5818x;
    public final k4 f5819y;
    public final c4 f5820z;
    public boolean O = false;
    public final AtomicInteger X = new AtomicInteger(0);

    public x4(n5 n5Var) {
        long currentTimeMillis;
        e4 e4Var;
        String str;
        com.google.android.gms.internal.measurement.e5 f5Var;
        Bundle bundle;
        boolean z10 = false;
        Context context = n5Var.f5529a;
        com.google.android.gms.internal.measurement.z4 z4Var = new com.google.android.gms.internal.measurement.z4(0);
        this.f5817w = z4Var;
        o1.l.f7829t = z4Var;
        this.f5812r = context;
        this.f5813s = n5Var.f5530b;
        this.f5814t = n5Var.f5531c;
        this.f5815u = n5Var.f5532d;
        this.f5816v = n5Var.f5536h;
        this.R = n5Var.f5533e;
        this.J = n5Var.f5538j;
        this.U = true;
        com.google.android.gms.internal.measurement.z0 z0Var = n5Var.f5535g;
        if (z0Var != null && (bundle = z0Var.f2688x) != null) {
            Object obj = bundle.get("measurementEnabled");
            if (obj instanceof Boolean) {
                this.S = (Boolean) obj;
            }
            Object obj2 = z0Var.f2688x.get("measurementDeactivated");
            if (obj2 instanceof Boolean) {
                this.T = (Boolean) obj2;
            }
        }
        if (com.google.android.gms.internal.measurement.o4.f2482h == null && context != null) {
            Object obj3 = com.google.android.gms.internal.measurement.o4.f2481g;
            synchronized (obj3) {
                if (com.google.android.gms.internal.measurement.o4.f2482h == null) {
                    synchronized (obj3) {
                        com.google.android.gms.internal.measurement.i4 i4Var = com.google.android.gms.internal.measurement.o4.f2482h;
                        Context applicationContext = context.getApplicationContext();
                        applicationContext = applicationContext == null ? context : applicationContext;
                        if (i4Var == null || i4Var.f2359a != applicationContext) {
                            com.google.android.gms.internal.measurement.h4.d();
                            com.google.android.gms.internal.measurement.y4.a();
                            com.google.android.gms.internal.measurement.l4.I();
                            com.google.android.gms.internal.measurement.e5 q4Var = new com.google.android.gms.internal.measurement.q4(applicationContext);
                            if (!(q4Var instanceof com.google.android.gms.internal.measurement.f5) && !(q4Var instanceof com.google.android.gms.internal.measurement.g5)) {
                                if (q4Var instanceof Serializable) {
                                    f5Var = new com.google.android.gms.internal.measurement.g5(q4Var);
                                } else {
                                    f5Var = new com.google.android.gms.internal.measurement.f5(q4Var);
                                }
                                q4Var = f5Var;
                            }
                            com.google.android.gms.internal.measurement.o4.f2482h = new com.google.android.gms.internal.measurement.i4(applicationContext, q4Var);
                            com.google.android.gms.internal.measurement.o4.f2484j.incrementAndGet();
                        }
                    }
                }
            }
        }
        this.E = u4.l.D;
        Long l10 = n5Var.f5537i;
        if (l10 != null) {
            currentTimeMillis = l10.longValue();
        } else {
            currentTimeMillis = System.currentTimeMillis();
        }
        this.Y = currentTimeMillis;
        this.f5818x = new f(this);
        k4 k4Var = new k4(this);
        k4Var.s();
        this.f5819y = k4Var;
        c4 c4Var = new c4(this);
        c4Var.s();
        this.f5820z = c4Var;
        m7 m7Var = new m7(this);
        m7Var.s();
        this.C = m7Var;
        this.D = new a4(new q5(this, 0));
        this.H = new r(this);
        j6 j6Var = new j6(this);
        j6Var.z();
        this.F = j6Var;
        p5 p5Var = new p5(this);
        p5Var.z();
        this.G = p5Var;
        x6 x6Var = new x6(this);
        x6Var.z();
        this.B = x6Var;
        d6 d6Var = new d6(this);
        d6Var.s();
        this.I = d6Var;
        t4 t4Var = new t4(this);
        t4Var.s();
        this.A = t4Var;
        com.google.android.gms.internal.measurement.z0 z0Var2 = n5Var.f5535g;
        if (z0Var2 != null && z0Var2.f2683s != 0) {
            z10 = true;
        }
        boolean z11 = !z10;
        if (context.getApplicationContext() instanceof Application) {
            g(p5Var);
            if (p5Var.a().getApplicationContext() instanceof Application) {
                Application application = (Application) p5Var.a().getApplicationContext();
                if (p5Var.f5581t == null) {
                    p5Var.f5581t = new com.google.android.gms.internal.measurement.d1(1, p5Var);
                }
                if (z11) {
                    application.unregisterActivityLifecycleCallbacks(p5Var.f5581t);
                    application.registerActivityLifecycleCallbacks(p5Var.f5581t);
                    e4Var = p5Var.c().E;
                    str = "Registered activity lifecycle callback";
                }
            }
            t4Var.A(new k.j(this, 13, n5Var));
        }
        i(c4Var);
        e4Var = c4Var.f5290z;
        str = "Application context is not an Application";
        e4Var.b(str);
        t4Var.A(new k.j(this, 13, n5Var));
    }

    public static x4 f(Context context, com.google.android.gms.internal.measurement.z0 z0Var, Long l10) {
        Bundle bundle;
        if (z0Var != null && (z0Var.f2686v == null || z0Var.f2687w == null)) {
            z0Var = new com.google.android.gms.internal.measurement.z0(z0Var.f2682r, z0Var.f2683s, z0Var.f2684t, z0Var.f2685u, null, null, z0Var.f2688x, null);
        }
        p1.b.i(context);
        p1.b.i(context.getApplicationContext());
        if (Z == null) {
            synchronized (x4.class) {
                if (Z == null) {
                    Z = new x4(new n5(context, z0Var, l10));
                }
            }
        } else if (z0Var != null && (bundle = z0Var.f2688x) != null && bundle.containsKey("dataCollectionDefaultEnabled")) {
            p1.b.i(Z);
            Z.R = Boolean.valueOf(z0Var.f2688x.getBoolean("dataCollectionDefaultEnabled"));
        }
        p1.b.i(Z);
        return Z;
    }

    public static void g(o2 o2Var) {
        if (o2Var != null) {
            if (o2Var.f5559s) {
                return;
            }
            throw new IllegalStateException("Component not initialized: ".concat(String.valueOf(o2Var.getClass())));
        }
        throw new IllegalStateException("Component not created");
    }

    public static void h(j5 j5Var) {
        if (j5Var == null) {
            throw new IllegalStateException("Component not created");
        }
    }

    public static void i(j5 j5Var) {
        if (j5Var != null) {
            if (j5Var.f5429s) {
                return;
            }
            throw new IllegalStateException("Component not initialized: ".concat(String.valueOf(j5Var.getClass())));
        }
        throw new IllegalStateException("Component not created");
    }

    @Override
    public final Context a() {
        return this.f5812r;
    }

    @Override
    public final com.google.android.gms.internal.measurement.z4 b() {
        return this.f5817w;
    }

    @Override
    public final c4 c() {
        c4 c4Var = this.f5820z;
        i(c4Var);
        return c4Var;
    }

    @Override
    public final t4 d() {
        t4 t4Var = this.A;
        i(t4Var);
        return t4Var;
    }

    @Override
    public final y4.a e() {
        return this.E;
    }

    public final boolean j() {
        return m() == 0;
    }

    public final boolean k() {
        boolean z10;
        Boolean valueOf;
        if (this.O) {
            t4 t4Var = this.A;
            i(t4Var);
            t4Var.q();
            Boolean bool = this.P;
            u4.l lVar = this.E;
            if (bool != null && this.Q != 0) {
                if (!bool.booleanValue()) {
                    lVar.getClass();
                }
                return this.P.booleanValue();
            }
            lVar.getClass();
            this.Q = SystemClock.elapsedRealtime();
            m7 m7Var = this.C;
            h(m7Var);
            boolean z11 = false;
            if (m7Var.s0("android.permission.INTERNET") && m7Var.s0("android.permission.ACCESS_NETWORK_STATE")) {
                Context context = this.f5812r;
                if (z4.b.a(context).c() || this.f5818x.F() || (m7.V(context) && m7.g0(context))) {
                    z10 = true;
                    valueOf = Boolean.valueOf(z10);
                    this.P = valueOf;
                    if (valueOf.booleanValue()) {
                        String C = p().C();
                        z3 p10 = p();
                        p10.y();
                        if (!m7Var.Y(C, p10.D)) {
                            z3 p11 = p();
                            p11.y();
                        }
                        z11 = true;
                        this.P = Boolean.valueOf(z11);
                    }
                    return this.P.booleanValue();
                }
            }
            z10 = false;
            valueOf = Boolean.valueOf(z10);
            this.P = valueOf;
            if (valueOf.booleanValue()) {
            }
            return this.P.booleanValue();
        }
        throw new IllegalStateException("AppMeasurement is not initialized");
    }

    public final boolean l() {
        Pair pair;
        boolean z10;
        NetworkInfo activeNetworkInfo;
        boolean z11;
        URL url;
        j h10;
        boolean z12;
        int i10;
        int i11;
        String str;
        t4 t4Var = this.A;
        i(t4Var);
        t4Var.q();
        d6 d6Var = this.I;
        i(d6Var);
        i(d6Var);
        String B = p().B();
        k4 k4Var = this.f5819y;
        h(k4Var);
        k4Var.q();
        ((l9) m9.f2438s.a()).getClass();
        Bundle bundle = null;
        if (k4Var.m().z(null, x.I0) && !k4Var.C().d(k5.AD_STORAGE)) {
            pair = new Pair("", Boolean.FALSE);
        } else {
            ((u4.l) k4Var.e()).getClass();
            long elapsedRealtime = SystemClock.elapsedRealtime();
            if (k4Var.f5458x != null && elapsedRealtime < k4Var.f5460z) {
                pair = new Pair(k4Var.f5458x, Boolean.valueOf(k4Var.f5459y));
            } else {
                f m10 = k4Var.m();
                m10.getClass();
                k4Var.f5460z = m10.v(B, x.f5759b) + elapsedRealtime;
                try {
                    f.v0 a10 = o4.a.a(k4Var.a());
                    k4Var.f5458x = "";
                    String str2 = (String) a10.f3884t;
                    if (str2 != null) {
                        k4Var.f5458x = str2;
                    }
                    k4Var.f5459y = a10.f3883s;
                } catch (Exception e10) {
                    k4Var.c().D.c("Unable to get advertising id", e10);
                    k4Var.f5458x = "";
                }
                pair = new Pair(k4Var.f5458x, Boolean.valueOf(k4Var.f5459y));
            }
        }
        Pair pair2 = pair;
        f fVar = this.f5818x;
        Boolean A = fVar.A("google_analytics_adid_collection_enabled");
        boolean z13 = false;
        if (A != null && !A.booleanValue()) {
            z10 = false;
        } else {
            z10 = true;
        }
        c4 c4Var = this.f5820z;
        if (z10 && !((Boolean) pair2.second).booleanValue() && !TextUtils.isEmpty((CharSequence) pair2.first)) {
            i(d6Var);
            d6Var.r();
            ConnectivityManager connectivityManager = (ConnectivityManager) d6Var.a().getSystemService("connectivity");
            if (connectivityManager != null) {
                try {
                    activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
                } catch (SecurityException unused) {
                }
                if (activeNetworkInfo == null && activeNetworkInfo.isConnected()) {
                    z11 = true;
                } else {
                    z11 = false;
                }
                if (z11) {
                    i(c4Var);
                    c4Var.f5290z.b("Network is not available for Deferred Deep Link request. Skipping");
                    return false;
                }
                StringBuilder sb2 = new StringBuilder();
                b9.b();
                if (fVar.z(null, x.L0)) {
                    p B2 = k4Var.B();
                    k5 k5Var = k5.AD_USER_DATA;
                    Boolean bool = (Boolean) B2.f5574e.get(k5Var);
                    if (bool != null && !bool.booleanValue()) {
                        i(c4Var);
                        c4Var.D.b("DMA consent not granted on client. Skipping");
                        return false;
                    }
                    p5 p5Var = this.G;
                    g(p5Var);
                    p5Var.q();
                    m6 v10 = p5Var.v();
                    v10.q();
                    v10.y();
                    w3 w3Var = v10.f5506u;
                    if (w3Var == null) {
                        v10.G();
                        v10.c().D.b("Failed to get consents; not connected to service yet.");
                    } else {
                        try {
                            h10 = w3Var.h(v10.N(false));
                            v10.L();
                        } catch (RemoteException e11) {
                            v10.c().f5287w.c("Failed to get consents; remote exception", e11);
                        }
                        if (h10 != null) {
                            bundle = h10.f5419r;
                        }
                        if (bundle != null) {
                            int i12 = this.W;
                            this.W = i12 + 1;
                            if (i12 < 10) {
                                z13 = true;
                            }
                            i(c4Var);
                            if (z13) {
                                str = "Retrying.";
                            } else {
                                str = "Skipping.";
                            }
                            c4Var.D.c(j.i0.q("Failed to retrieve DMA consent from the service, ", str, " retryCount"), Integer.valueOf(this.W));
                            return z13;
                        }
                        p a11 = p.a(100, bundle);
                        Boolean bool2 = (Boolean) a11.f5574e.get(k5Var);
                        Boolean bool3 = Boolean.TRUE;
                        Boolean bool4 = a11.f5572c;
                        String str3 = a11.f5573d;
                        if (bool2 == bool3 && !"-".equals(str3) && (!TextUtils.isEmpty(str3) || bool4 == Boolean.FALSE)) {
                            z12 = true;
                        } else {
                            z12 = false;
                        }
                        if (!z12) {
                            i(c4Var);
                            c4Var.D.b("DMA consent not granted on service. Skipping");
                            return false;
                        }
                        l5 a12 = l5.a(100, bundle);
                        sb2.append("&gcs=");
                        sb2.append(a12.i());
                        sb2.append("&dma=");
                        if (bool4 == Boolean.FALSE) {
                            i10 = 0;
                        } else {
                            i10 = 1;
                        }
                        sb2.append(i10);
                        if (!TextUtils.isEmpty(str3)) {
                            sb2.append("&dma_cps=");
                            sb2.append(str3);
                        }
                        if (l5.f(bundle.getString("ad_personalization")) == bool3) {
                            i11 = 0;
                        } else {
                            i11 = 1;
                        }
                        sb2.append("&npa=");
                        sb2.append(i11);
                        i(c4Var);
                        c4Var.E.c("Consent query parameters to Bow", sb2);
                    }
                    h10 = null;
                    if (h10 != null) {
                    }
                    if (bundle != null) {
                    }
                }
                m7 m7Var = this.C;
                h(m7Var);
                p();
                String str4 = (String) pair2.first;
                long a13 = k4Var.K.a() - 1;
                String sb3 = sb2.toString();
                try {
                    p1.b.f(str4);
                    p1.b.f(B);
                    String format = String.format("https://www.googleadservices.com/pagead/conversion/app/deeplink?id_type=adid&sdk_version=%s&rdid=%s&bundleid=%s&retry=%s", String.format("v%s.%s", 81010L, Integer.valueOf(m7Var.t0())), str4, B, Long.valueOf(a13));
                    if (B.equals(m7Var.m().h("debug.deferred.deeplink", ""))) {
                        format = format.concat("&ddl_test=1");
                    }
                    if (!sb3.isEmpty()) {
                        if (sb3.charAt(0) != '&') {
                            format = format.concat("&");
                        }
                        format = format.concat(sb3);
                    }
                    url = new URL(format);
                } catch (IllegalArgumentException | MalformedURLException e12) {
                    m7Var.c().f5287w.c("Failed to create BOW URL for Deferred Deep Link. exception", e12.getMessage());
                    url = null;
                }
                if (url != null) {
                    i(d6Var);
                    z4 z4Var = new z4(0, this);
                    d6Var.q();
                    d6Var.r();
                    d6Var.d().y(new f6(d6Var, B, url, z4Var));
                }
                return false;
            }
            activeNetworkInfo = null;
            if (activeNetworkInfo == null) {
            }
            z11 = false;
            if (z11) {
            }
        } else {
            i(c4Var);
            c4Var.D.b("ADID unavailable to retrieve Deferred Deep Link. Skipping");
            return false;
        }
    }

    public final int m() {
        t4 t4Var = this.A;
        i(t4Var);
        t4Var.q();
        if (this.f5818x.E()) {
            return 1;
        }
        Boolean bool = this.T;
        if (bool != null && bool.booleanValue()) {
            return 2;
        }
        t4 t4Var2 = this.A;
        i(t4Var2);
        t4Var2.q();
        if (!this.U) {
            return 8;
        }
        k4 k4Var = this.f5819y;
        h(k4Var);
        Boolean D = k4Var.D();
        if (D != null) {
            if (D.booleanValue()) {
                return 0;
            }
            return 3;
        }
        Boolean A = this.f5818x.A("firebase_analytics_collection_enabled");
        if (A != null) {
            if (A.booleanValue()) {
                return 0;
            }
            return 4;
        }
        Boolean bool2 = this.S;
        if (bool2 != null) {
            if (bool2.booleanValue()) {
                return 0;
            }
            return 5;
        } else if (this.R == null || this.R.booleanValue()) {
            return 0;
        } else {
            return 7;
        }
    }

    public final r n() {
        r rVar = this.H;
        if (rVar != null) {
            return rVar;
        }
        throw new IllegalStateException("Component not created");
    }

    public final s o() {
        i(this.M);
        return this.M;
    }

    public final z3 p() {
        g(this.N);
        return this.N;
    }

    public final a4 q() {
        return this.D;
    }

    public final m6 r() {
        g(this.L);
        return this.L;
    }

    public final void s() {
        h(this.C);
    }
}