408 lines
12 KiB
Java
408 lines
12 KiB
Java
package c.i.a.f.i.b;
|
|
|
|
import android.app.Application;
|
|
import android.content.Context;
|
|
import android.os.Bundle;
|
|
import android.os.SystemClock;
|
|
import android.text.TextUtils;
|
|
import androidx.annotation.WorkerThread;
|
|
import c.i.a.f.e.h.j.h;
|
|
import c.i.a.f.e.o.b;
|
|
import c.i.a.f.e.o.c;
|
|
import c.i.a.f.e.o.d;
|
|
import c.i.a.f.h.l.c2;
|
|
import c.i.a.f.h.l.k2;
|
|
import c.i.a.f.h.l.l2;
|
|
import c.i.a.f.h.l.s2;
|
|
import c.i.a.f.h.l.t2;
|
|
import c.i.a.f.h.l.t8;
|
|
import c.i.a.f.h.l.v1;
|
|
import c.i.a.f.h.l.y1;
|
|
import com.google.android.gms.internal.measurement.zzae;
|
|
import java.util.Objects;
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
/* compiled from: com.google.android.gms:play-services-measurement-impl@@18.0.0 */
|
|
public class u4 implements t5 {
|
|
public static volatile u4 a;
|
|
public long A;
|
|
public volatile Boolean B;
|
|
public Boolean C;
|
|
public Boolean D;
|
|
public volatile boolean E;
|
|
public int F;
|
|
public AtomicInteger G = new AtomicInteger(0);
|
|
public final long H;
|
|
public final Context b;
|
|
|
|
/* renamed from: c reason: collision with root package name */
|
|
public final String f1195c;
|
|
public final String d;
|
|
public final String e;
|
|
public final boolean f;
|
|
public final ga g;
|
|
public final c h;
|
|
public final d4 i;
|
|
public final q3 j;
|
|
public final r4 k;
|
|
public final w8 l;
|
|
public final t9 m;
|
|
public final o3 n;
|
|
public final b o;
|
|
public final h7 p;
|
|
public final c6 q;
|
|
public final a r;
|
|
|
|
/* renamed from: s reason: collision with root package name */
|
|
public final d7 f1196s;
|
|
public m3 t;
|
|
public q7 u;
|
|
public j v;
|
|
public n3 w;
|
|
|
|
/* renamed from: x reason: collision with root package name */
|
|
public m4 f1197x;
|
|
|
|
/* renamed from: y reason: collision with root package name */
|
|
public boolean f1198y = false;
|
|
|
|
/* renamed from: z reason: collision with root package name */
|
|
public Boolean f1199z;
|
|
|
|
public u4(y5 y5Var) {
|
|
Context context;
|
|
Bundle bundle;
|
|
boolean z2 = false;
|
|
Context context2 = y5Var.a;
|
|
ga gaVar = new ga();
|
|
this.g = gaVar;
|
|
c.h = gaVar;
|
|
this.b = context2;
|
|
this.f1195c = y5Var.b;
|
|
this.d = y5Var.f1204c;
|
|
this.e = y5Var.d;
|
|
this.f = y5Var.h;
|
|
this.B = y5Var.e;
|
|
this.E = true;
|
|
zzae zzae = y5Var.g;
|
|
if (!(zzae == null || (bundle = zzae.o) == null)) {
|
|
Object obj = bundle.get("measurementEnabled");
|
|
if (obj instanceof Boolean) {
|
|
this.C = (Boolean) obj;
|
|
}
|
|
Object obj2 = zzae.o.get("measurementDeactivated");
|
|
if (obj2 instanceof Boolean) {
|
|
this.D = (Boolean) obj2;
|
|
}
|
|
}
|
|
synchronized (l2.a) {
|
|
t2 t2Var = l2.b;
|
|
Context applicationContext = context2.getApplicationContext();
|
|
applicationContext = applicationContext == null ? context2 : applicationContext;
|
|
if (t2Var == null || t2Var.a() != applicationContext) {
|
|
y1.c();
|
|
s2.b();
|
|
synchronized (c2.class) {
|
|
c2 c2Var = c2.a;
|
|
if (!(c2Var == null || (context = c2Var.b) == null || c2Var.f1083c == null)) {
|
|
context.getContentResolver().unregisterContentObserver(c2.a.f1083c);
|
|
}
|
|
c2.a = null;
|
|
}
|
|
l2.b = new v1(applicationContext, c.B0(new k2(applicationContext)));
|
|
l2.d.incrementAndGet();
|
|
}
|
|
}
|
|
this.o = d.a;
|
|
Long l = y5Var.i;
|
|
this.H = l != null ? l.longValue() : System.currentTimeMillis();
|
|
this.h = new c(this);
|
|
d4 d4Var = new d4(this);
|
|
d4Var.p();
|
|
this.i = d4Var;
|
|
q3 q3Var = new q3(this);
|
|
q3Var.p();
|
|
this.j = q3Var;
|
|
t9 t9Var = new t9(this);
|
|
t9Var.p();
|
|
this.m = t9Var;
|
|
o3 o3Var = new o3(this);
|
|
o3Var.p();
|
|
this.n = o3Var;
|
|
this.r = new a(this);
|
|
h7 h7Var = new h7(this);
|
|
h7Var.u();
|
|
this.p = h7Var;
|
|
c6 c6Var = new c6(this);
|
|
c6Var.u();
|
|
this.q = c6Var;
|
|
w8 w8Var = new w8(this);
|
|
w8Var.u();
|
|
this.l = w8Var;
|
|
d7 d7Var = new d7(this);
|
|
d7Var.p();
|
|
this.f1196s = d7Var;
|
|
r4 r4Var = new r4(this);
|
|
r4Var.p();
|
|
this.k = r4Var;
|
|
zzae zzae2 = y5Var.g;
|
|
if (!(zzae2 == null || zzae2.j == 0)) {
|
|
z2 = true;
|
|
}
|
|
boolean z3 = !z2;
|
|
if (context2.getApplicationContext() instanceof Application) {
|
|
c6 s2 = s();
|
|
if (s2.a.b.getApplicationContext() instanceof Application) {
|
|
Application application = (Application) s2.a.b.getApplicationContext();
|
|
if (s2.f1140c == null) {
|
|
s2.f1140c = new y6(s2, null);
|
|
}
|
|
if (z3) {
|
|
application.unregisterActivityLifecycleCallbacks(s2.f1140c);
|
|
application.registerActivityLifecycleCallbacks(s2.f1140c);
|
|
s2.g().n.a("Registered activity lifecycle callback");
|
|
}
|
|
}
|
|
} else {
|
|
g().i.a("Application context is not an Application");
|
|
}
|
|
r4Var.v(new w4(this, y5Var));
|
|
}
|
|
|
|
public static u4 b(Context context, zzae zzae, Long l) {
|
|
Bundle bundle;
|
|
if (zzae != null && (zzae.m == null || zzae.n == null)) {
|
|
zzae = new zzae(zzae.i, zzae.j, zzae.k, zzae.l, null, null, zzae.o);
|
|
}
|
|
Objects.requireNonNull(context, "null reference");
|
|
Objects.requireNonNull(context.getApplicationContext(), "null reference");
|
|
if (a == null) {
|
|
synchronized (u4.class) {
|
|
if (a == null) {
|
|
a = new u4(new y5(context, zzae, l));
|
|
}
|
|
}
|
|
} else if (!(zzae == null || (bundle = zzae.o) == null || !bundle.containsKey("dataCollectionDefaultEnabled"))) {
|
|
a.B = Boolean.valueOf(zzae.o.getBoolean("dataCollectionDefaultEnabled"));
|
|
}
|
|
return a;
|
|
}
|
|
|
|
public static void c(s5 s5Var) {
|
|
if (s5Var == null) {
|
|
throw new IllegalStateException("Component not created");
|
|
}
|
|
}
|
|
|
|
public static void p(a5 a5Var) {
|
|
if (a5Var == null) {
|
|
throw new IllegalStateException("Component not created");
|
|
} else if (!a5Var.b) {
|
|
String valueOf = String.valueOf(a5Var.getClass());
|
|
StringBuilder sb = new StringBuilder(valueOf.length() + 27);
|
|
sb.append("Component not initialized: ");
|
|
sb.append(valueOf);
|
|
throw new IllegalStateException(sb.toString());
|
|
}
|
|
}
|
|
|
|
public static void q(r5 r5Var) {
|
|
if (r5Var == null) {
|
|
throw new IllegalStateException("Component not created");
|
|
} else if (!r5Var.n()) {
|
|
String valueOf = String.valueOf(r5Var.getClass());
|
|
StringBuilder sb = new StringBuilder(valueOf.length() + 27);
|
|
sb.append("Component not initialized: ");
|
|
sb.append(valueOf);
|
|
throw new IllegalStateException(sb.toString());
|
|
}
|
|
}
|
|
|
|
public final a A() {
|
|
a aVar = this.r;
|
|
if (aVar != null) {
|
|
return aVar;
|
|
}
|
|
throw new IllegalStateException("Component not created");
|
|
}
|
|
|
|
@WorkerThread
|
|
public final boolean B() {
|
|
return this.B != null && this.B.booleanValue();
|
|
}
|
|
|
|
public final c a() {
|
|
return this.h;
|
|
}
|
|
|
|
@WorkerThread
|
|
public final boolean d() {
|
|
return e() == 0;
|
|
}
|
|
|
|
@WorkerThread
|
|
public final int e() {
|
|
f().b();
|
|
if (this.h.x()) {
|
|
return 1;
|
|
}
|
|
Boolean bool = this.D;
|
|
if (bool != null && bool.booleanValue()) {
|
|
return 2;
|
|
}
|
|
if (t8.b() && this.h.o(p.H0) && !i()) {
|
|
return 8;
|
|
}
|
|
Boolean x2 = o().x();
|
|
if (x2 != null) {
|
|
return x2.booleanValue() ? 0 : 3;
|
|
}
|
|
Boolean w = this.h.w("firebase_analytics_collection_enabled");
|
|
if (w != null) {
|
|
return w.booleanValue() ? 0 : 4;
|
|
}
|
|
Boolean bool2 = this.C;
|
|
if (bool2 != null) {
|
|
return bool2.booleanValue() ? 0 : 5;
|
|
}
|
|
if (h.a("isMeasurementExplicitlyDisabled").e) {
|
|
return 6;
|
|
}
|
|
return (!this.h.o(p.S) || this.B == null || this.B.booleanValue()) ? 0 : 7;
|
|
}
|
|
|
|
@Override // c.i.a.f.i.b.t5
|
|
public final r4 f() {
|
|
q(this.k);
|
|
return this.k;
|
|
}
|
|
|
|
@Override // c.i.a.f.i.b.t5
|
|
public final q3 g() {
|
|
q(this.j);
|
|
return this.j;
|
|
}
|
|
|
|
@Override // c.i.a.f.i.b.t5
|
|
public final b h() {
|
|
return this.o;
|
|
}
|
|
|
|
@WorkerThread
|
|
public final boolean i() {
|
|
f().b();
|
|
return this.E;
|
|
}
|
|
|
|
@Override // c.i.a.f.i.b.t5
|
|
public final Context j() {
|
|
return this.b;
|
|
}
|
|
|
|
@Override // c.i.a.f.i.b.t5
|
|
public final ga k() {
|
|
return this.g;
|
|
}
|
|
|
|
public final void l() {
|
|
throw new IllegalStateException("Unexpected call on client side");
|
|
}
|
|
|
|
/* JADX WARNING: Code restructure failed: missing block: B:29:0x00c1, code lost:
|
|
if (android.text.TextUtils.isEmpty(r0.l) == false) goto L_0x00c3;
|
|
*/
|
|
/* JADX WARNING: Code restructure failed: missing block: B:9:0x0033, code lost:
|
|
if (java.lang.Math.abs(android.os.SystemClock.elapsedRealtime() - r6.A) > 1000) goto L_0x0035;
|
|
*/
|
|
@WorkerThread
|
|
public final boolean m() {
|
|
if (this.f1198y) {
|
|
f().b();
|
|
Boolean bool = this.f1199z;
|
|
if (!(bool == null || this.A == 0)) {
|
|
if (!bool.booleanValue()) {
|
|
Objects.requireNonNull((d) this.o);
|
|
}
|
|
return this.f1199z.booleanValue();
|
|
}
|
|
Objects.requireNonNull((d) this.o);
|
|
this.A = SystemClock.elapsedRealtime();
|
|
boolean z2 = false;
|
|
Boolean valueOf = Boolean.valueOf(t().p0("android.permission.INTERNET") && t().p0("android.permission.ACCESS_NETWORK_STATE") && (c.i.a.f.e.p.b.a(this.b).c() || this.h.C() || (n4.a(this.b) && t9.U(this.b))));
|
|
this.f1199z = valueOf;
|
|
if (valueOf.booleanValue()) {
|
|
t9 t = t();
|
|
n3 z3 = z();
|
|
z3.t();
|
|
String str = z3.k;
|
|
n3 z4 = z();
|
|
z4.t();
|
|
String str2 = z4.l;
|
|
n3 z5 = z();
|
|
z5.t();
|
|
if (!t.c0(str, str2, z5.m)) {
|
|
n3 z6 = z();
|
|
z6.t();
|
|
}
|
|
z2 = true;
|
|
this.f1199z = Boolean.valueOf(z2);
|
|
}
|
|
return this.f1199z.booleanValue();
|
|
}
|
|
throw new IllegalStateException("AppMeasurement is not initialized");
|
|
}
|
|
|
|
public final d7 n() {
|
|
q(this.f1196s);
|
|
return this.f1196s;
|
|
}
|
|
|
|
public final d4 o() {
|
|
c(this.i);
|
|
return this.i;
|
|
}
|
|
|
|
public final w8 r() {
|
|
p(this.l);
|
|
return this.l;
|
|
}
|
|
|
|
public final c6 s() {
|
|
p(this.q);
|
|
return this.q;
|
|
}
|
|
|
|
public final t9 t() {
|
|
c(this.m);
|
|
return this.m;
|
|
}
|
|
|
|
public final o3 u() {
|
|
c(this.n);
|
|
return this.n;
|
|
}
|
|
|
|
public final boolean v() {
|
|
return TextUtils.isEmpty(this.f1195c);
|
|
}
|
|
|
|
public final h7 w() {
|
|
p(this.p);
|
|
return this.p;
|
|
}
|
|
|
|
public final q7 x() {
|
|
p(this.u);
|
|
return this.u;
|
|
}
|
|
|
|
public final j y() {
|
|
q(this.v);
|
|
return this.v;
|
|
}
|
|
|
|
public final n3 z() {
|
|
p(this.w);
|
|
return this.w;
|
|
}
|
|
}
|