Souza NET DTunnel v4.2.6版本的 MD5 值为:9c33be9da88136132d2ea8a79815d093
以下内容为反编译后的 y4.java 源代码,内容仅作参考
package q5;
import android.app.Application;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.Build;
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.c9;
import com.google.android.gms.internal.measurement.m9;
import com.google.android.gms.internal.measurement.n9;
import java.io.Serializable;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.concurrent.atomic.AtomicInteger;
public final class y4 implements i5 {
public static volatile y4 f9396a0;
public final d4 A;
public final u4 B;
public final x6 C;
public final m7 D;
public final b4 E;
public final c5.l F;
public final j6 G;
public final p5 H;
public final r I;
public final d6 J;
public final String K;
public z3 L;
public m6 M;
public s N;
public a4 O;
public Boolean Q;
public long R;
public volatile Boolean S;
public final Boolean T;
public final Boolean U;
public volatile boolean V;
public int W;
public int X;
public final long Z;
public final Context f9397s;
public final String f9398t;
public final String f9399u;
public final String f9400v;
public final boolean f9401w;
public final com.google.android.gms.internal.measurement.a5 f9402x;
public final f f9403y;
public final l4 f9404z;
public boolean P = false;
public final AtomicInteger Y = new AtomicInteger(0);
public y4(n5 n5Var) {
long currentTimeMillis;
f4 f4Var;
String str;
com.google.android.gms.internal.measurement.f5 g5Var;
Bundle bundle;
boolean z10 = false;
Context context = n5Var.f9103a;
com.google.android.gms.internal.measurement.a5 a5Var = new com.google.android.gms.internal.measurement.a5(0);
this.f9402x = a5Var;
com.bumptech.glide.e.f2474c = a5Var;
this.f9397s = context;
this.f9398t = n5Var.f9104b;
this.f9399u = n5Var.f9105c;
this.f9400v = n5Var.f9106d;
this.f9401w = n5Var.f9110h;
this.S = n5Var.f9107e;
this.K = n5Var.f9112j;
this.V = true;
com.google.android.gms.internal.measurement.z0 z0Var = n5Var.f9109g;
if (z0Var != null && (bundle = z0Var.f3208y) != null) {
Object obj = bundle.get("measurementEnabled");
if (obj instanceof Boolean) {
this.T = (Boolean) obj;
}
Object obj2 = z0Var.f3208y.get("measurementDeactivated");
if (obj2 instanceof Boolean) {
this.U = (Boolean) obj2;
}
}
if (com.google.android.gms.internal.measurement.p4.f3035h == null && context != null) {
Object obj3 = com.google.android.gms.internal.measurement.p4.f3034g;
synchronized (obj3) {
if (com.google.android.gms.internal.measurement.p4.f3035h == null) {
synchronized (obj3) {
com.google.android.gms.internal.measurement.i4 i4Var = com.google.android.gms.internal.measurement.p4.f3035h;
final Context applicationContext = context.getApplicationContext();
applicationContext = applicationContext == null ? context : applicationContext;
if (i4Var == null || i4Var.f2900a != applicationContext) {
com.google.android.gms.internal.measurement.h4.d();
com.google.android.gms.internal.measurement.z4.a();
com.google.android.gms.internal.measurement.m4.H();
com.google.android.gms.internal.measurement.f5 f5Var = new com.google.android.gms.internal.measurement.f5() {
@Override
public final Object a() {
d5 d5Var;
boolean z11;
d5 P;
boolean isDeviceProtectedStorage;
Context context2 = applicationContext;
synchronized (n4.class) {
d5Var = n4.f2991a;
if (d5Var == null) {
String str2 = Build.TYPE;
String str3 = Build.TAGS;
if ((!str2.equals("eng") && !str2.equals("userdebug")) || (!str3.contains("dev-keys") && !str3.contains("test-keys"))) {
z11 = false;
if (z11) {
P = b5.f2713s;
} else {
if (g4.a()) {
isDeviceProtectedStorage = context2.isDeviceProtectedStorage();
if (!isDeviceProtectedStorage) {
context2 = context2.createDeviceProtectedStorageContext();
}
}
P = c5.l.P(context2);
}
d5Var = P;
n4.f2991a = d5Var;
}
z11 = true;
if (z11) {
}
d5Var = P;
n4.f2991a = d5Var;
}
}
return d5Var;
}
};
if (!(f5Var instanceof com.google.android.gms.internal.measurement.g5) && !(f5Var instanceof com.google.android.gms.internal.measurement.h5)) {
if (f5Var instanceof Serializable) {
g5Var = new com.google.android.gms.internal.measurement.h5(f5Var);
} else {
g5Var = new com.google.android.gms.internal.measurement.g5(f5Var);
}
f5Var = g5Var;
}
com.google.android.gms.internal.measurement.p4.f3035h = new com.google.android.gms.internal.measurement.i4(applicationContext, f5Var);
com.google.android.gms.internal.measurement.p4.f3037j.incrementAndGet();
}
}
}
}
}
this.F = c5.l.f2352z;
Long l10 = n5Var.f9111i;
if (l10 != null) {
currentTimeMillis = l10.longValue();
} else {
currentTimeMillis = System.currentTimeMillis();
}
this.Z = currentTimeMillis;
this.f9403y = new f(this);
l4 l4Var = new l4(this);
l4Var.s();
this.f9404z = l4Var;
d4 d4Var = new d4(this);
d4Var.s();
this.A = d4Var;
m7 m7Var = new m7(this);
m7Var.s();
this.D = m7Var;
this.E = new b4(new q5(this, 0));
this.I = new r(this);
j6 j6Var = new j6(this);
j6Var.z();
this.G = j6Var;
p5 p5Var = new p5(this);
p5Var.z();
this.H = p5Var;
x6 x6Var = new x6(this);
x6Var.z();
this.C = x6Var;
d6 d6Var = new d6(this);
d6Var.s();
this.J = d6Var;
u4 u4Var = new u4(this);
u4Var.s();
this.B = u4Var;
com.google.android.gms.internal.measurement.z0 z0Var2 = n5Var.f9109g;
if (z0Var2 != null && z0Var2.f3203t != 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.f9156u == null) {
p5Var.f9156u = new com.google.android.gms.internal.measurement.d1(1, p5Var);
}
if (z11) {
application.unregisterActivityLifecycleCallbacks(p5Var.f9156u);
application.registerActivityLifecycleCallbacks(p5Var.f9156u);
f4Var = p5Var.c().F;
str = "Registered activity lifecycle callback";
}
}
u4Var.A(new i.j(this, 13, n5Var));
}
i(d4Var);
f4Var = d4Var.A;
str = "Application context is not an Application";
f4Var.b(str);
u4Var.A(new i.j(this, 13, n5Var));
}
public static y4 f(Context context, com.google.android.gms.internal.measurement.z0 z0Var, Long l10) {
Bundle bundle;
if (z0Var != null && (z0Var.f3206w == null || z0Var.f3207x == null)) {
z0Var = new com.google.android.gms.internal.measurement.z0(z0Var.f3202s, z0Var.f3203t, z0Var.f3204u, z0Var.f3205v, null, null, z0Var.f3208y, null);
}
com.bumptech.glide.f.j(context);
com.bumptech.glide.f.j(context.getApplicationContext());
if (f9396a0 == null) {
synchronized (y4.class) {
if (f9396a0 == null) {
f9396a0 = new y4(new n5(context, z0Var, l10));
}
}
} else if (z0Var != null && (bundle = z0Var.f3208y) != null && bundle.containsKey("dataCollectionDefaultEnabled")) {
com.bumptech.glide.f.j(f9396a0);
f9396a0.S = Boolean.valueOf(z0Var.f3208y.getBoolean("dataCollectionDefaultEnabled"));
}
com.bumptech.glide.f.j(f9396a0);
return f9396a0;
}
public static void g(p2 p2Var) {
if (p2Var != null) {
if (p2Var.f9154t) {
return;
}
throw new IllegalStateException("Component not initialized: ".concat(String.valueOf(p2Var.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.f9007t) {
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.f9397s;
}
@Override
public final com.google.android.gms.internal.measurement.a5 b() {
return this.f9402x;
}
@Override
public final d4 c() {
d4 d4Var = this.A;
i(d4Var);
return d4Var;
}
@Override
public final u4 d() {
u4 u4Var = this.B;
i(u4Var);
return u4Var;
}
@Override
public final g5.a e() {
return this.F;
}
public final boolean j() {
return m() == 0;
}
public final boolean k() {
boolean z10;
Boolean valueOf;
if (this.P) {
u4 u4Var = this.B;
i(u4Var);
u4Var.q();
Boolean bool = this.Q;
c5.l lVar = this.F;
if (bool != null && this.R != 0) {
if (!bool.booleanValue()) {
lVar.getClass();
}
return this.Q.booleanValue();
}
lVar.getClass();
this.R = SystemClock.elapsedRealtime();
m7 m7Var = this.D;
h(m7Var);
boolean z11 = false;
if (m7Var.s0("android.permission.INTERNET") && m7Var.s0("android.permission.ACCESS_NETWORK_STATE")) {
Context context = this.f9397s;
if (h5.b.a(context).d() || this.f9403y.F() || (m7.W(context) && m7.g0(context))) {
z10 = true;
valueOf = Boolean.valueOf(z10);
this.Q = valueOf;
if (valueOf.booleanValue()) {
String C = p().C();
a4 p10 = p();
p10.y();
if (!m7Var.Z(C, p10.E)) {
a4 p11 = p();
p11.y();
}
z11 = true;
this.Q = Boolean.valueOf(z11);
}
return this.Q.booleanValue();
}
}
z10 = false;
valueOf = Boolean.valueOf(z10);
this.Q = valueOf;
if (valueOf.booleanValue()) {
}
return this.Q.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;
u4 u4Var = this.B;
i(u4Var);
u4Var.q();
d6 d6Var = this.J;
i(d6Var);
i(d6Var);
String B = p().B();
l4 l4Var = this.f9404z;
h(l4Var);
l4Var.q();
((m9) n9.f3001t.a()).getClass();
Bundle bundle = null;
if (l4Var.m().z(null, x.I0) && !l4Var.C().d(k5.f9035t)) {
pair = new Pair("", Boolean.FALSE);
} else {
((c5.l) l4Var.e()).getClass();
long elapsedRealtime = SystemClock.elapsedRealtime();
if (l4Var.f9056y != null && elapsedRealtime < l4Var.A) {
pair = new Pair(l4Var.f9056y, Boolean.valueOf(l4Var.f9057z));
} else {
f m10 = l4Var.m();
m10.getClass();
l4Var.A = m10.v(B, x.f9330b) + elapsedRealtime;
try {
a1.y a6 = w4.a.a(l4Var.a());
l4Var.f9056y = "";
String str2 = a6.f674b;
if (str2 != null) {
l4Var.f9056y = str2;
}
l4Var.f9057z = a6.f675c;
} catch (Exception e10) {
l4Var.c().E.c("Unable to get advertising id", e10);
l4Var.f9056y = "";
}
pair = new Pair(l4Var.f9056y, Boolean.valueOf(l4Var.f9057z));
}
}
Pair pair2 = pair;
f fVar = this.f9403y;
Boolean A = fVar.A("google_analytics_adid_collection_enabled");
boolean z13 = false;
if (A != null && !A.booleanValue()) {
z10 = false;
} else {
z10 = true;
}
d4 d4Var = this.A;
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(d4Var);
d4Var.A.b("Network is not available for Deferred Deep Link request. Skipping");
return false;
}
StringBuilder sb2 = new StringBuilder();
c9.b();
if (fVar.z(null, x.L0)) {
p B2 = l4Var.B();
k5 k5Var = k5.f9037v;
Boolean bool = (Boolean) B2.f9151e.get(k5Var);
if (bool != null && !bool.booleanValue()) {
i(d4Var);
d4Var.E.b("DMA consent not granted on client. Skipping");
return false;
}
p5 p5Var = this.H;
g(p5Var);
p5Var.q();
m6 v10 = p5Var.v();
v10.q();
v10.y();
x3 x3Var = v10.f9085v;
if (x3Var == null) {
v10.G();
v10.c().E.b("Failed to get consents; not connected to service yet.");
} else {
try {
h10 = x3Var.h(v10.N(false));
v10.L();
} catch (RemoteException e11) {
v10.c().f8894x.c("Failed to get consents; remote exception", e11);
}
if (h10 != null) {
bundle = h10.f8999s;
}
if (bundle != null) {
int i12 = this.X;
this.X = i12 + 1;
if (i12 < 10) {
z13 = true;
}
i(d4Var);
if (z13) {
str = "Retrying.";
} else {
str = "Skipping.";
}
d4Var.E.c(j6.c.j("Failed to retrieve DMA consent from the service, ", str, " retryCount"), Integer.valueOf(this.X));
return z13;
}
p a10 = p.a(100, bundle);
Boolean bool2 = (Boolean) a10.f9151e.get(k5Var);
Boolean bool3 = Boolean.TRUE;
Boolean bool4 = a10.f9149c;
String str3 = a10.f9150d;
if (bool2 == bool3 && !"-".equals(str3) && (!TextUtils.isEmpty(str3) || bool4 == Boolean.FALSE)) {
z12 = true;
} else {
z12 = false;
}
if (!z12) {
i(d4Var);
d4Var.E.b("DMA consent not granted on service. Skipping");
return false;
}
l5 a11 = l5.a(100, bundle);
sb2.append("&gcs=");
sb2.append(a11.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.e(bundle.getString("ad_personalization")) == bool3) {
i11 = 0;
} else {
i11 = 1;
}
sb2.append("&npa=");
sb2.append(i11);
i(d4Var);
d4Var.F.c("Consent query parameters to Bow", sb2);
}
h10 = null;
if (h10 != null) {
}
if (bundle != null) {
}
}
m7 m7Var = this.D;
h(m7Var);
p();
String str4 = (String) pair2.first;
long a12 = l4Var.L.a() - 1;
String sb3 = sb2.toString();
try {
com.bumptech.glide.f.g(str4);
com.bumptech.glide.f.g(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(a12));
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().f8894x.c("Failed to create BOW URL for Deferred Deep Link. exception", e12.getMessage());
url = null;
}
if (url != null) {
i(d6Var);
s4.e eVar = new s4.e(5, this);
d6Var.q();
d6Var.r();
d6Var.d().w(new f6(d6Var, B, url, eVar));
}
return false;
}
activeNetworkInfo = null;
if (activeNetworkInfo == null) {
}
z11 = false;
if (z11) {
}
} else {
i(d4Var);
d4Var.E.b("ADID unavailable to retrieve Deferred Deep Link. Skipping");
return false;
}
}
public final int m() {
u4 u4Var = this.B;
i(u4Var);
u4Var.q();
if (this.f9403y.E()) {
return 1;
}
Boolean bool = this.U;
if (bool != null && bool.booleanValue()) {
return 2;
}
u4 u4Var2 = this.B;
i(u4Var2);
u4Var2.q();
if (!this.V) {
return 8;
}
l4 l4Var = this.f9404z;
h(l4Var);
Boolean D = l4Var.D();
if (D != null) {
if (D.booleanValue()) {
return 0;
}
return 3;
}
Boolean A = this.f9403y.A("firebase_analytics_collection_enabled");
if (A != null) {
if (A.booleanValue()) {
return 0;
}
return 4;
}
Boolean bool2 = this.T;
if (bool2 != null) {
if (bool2.booleanValue()) {
return 0;
}
return 5;
} else if (this.S == null || this.S.booleanValue()) {
return 0;
} else {
return 7;
}
}
public final r n() {
r rVar = this.I;
if (rVar != null) {
return rVar;
}
throw new IllegalStateException("Component not created");
}
public final s o() {
i(this.N);
return this.N;
}
public final a4 p() {
g(this.O);
return this.O;
}
public final b4 q() {
return this.E;
}
public final m6 r() {
g(this.M);
return this.M;
}
public final void s() {
h(this.D);
}
}