264 lines
7.6 KiB
Java
264 lines
7.6 KiB
Java
package com.google.android.gms.measurement.internal;
|
|
|
|
import android.content.ComponentName;
|
|
import android.os.RemoteException;
|
|
import com.google.android.gms.common.internal.Preconditions;
|
|
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
|
|
import com.google.android.gms.common.stats.ConnectionTracker;
|
|
import java.util.ArrayList;
|
|
import java.util.Iterator;
|
|
import java.util.List;
|
|
import java.util.concurrent.atomic.AtomicReference;
|
|
|
|
/* loaded from: classes.dex */
|
|
public final class zzeb extends zzf {
|
|
private final zzes c;
|
|
private zzaj d;
|
|
private volatile Boolean e;
|
|
private final zzy f;
|
|
private final zzfj g;
|
|
private final List<Runnable> h;
|
|
private final zzy i;
|
|
|
|
protected zzeb(zzbw zzbwVar) {
|
|
super(zzbwVar);
|
|
this.h = new ArrayList();
|
|
this.g = new zzfj(zzbwVar.d());
|
|
this.c = new zzes(this);
|
|
this.f = new zzec(this, zzbwVar);
|
|
this.i = new zzek(this, zzbwVar);
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public final void H() {
|
|
f();
|
|
this.g.b();
|
|
this.f.a(zzai.Q.a().longValue());
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public final void I() {
|
|
f();
|
|
if (C()) {
|
|
e().B().a("Inactivity, disconnecting from the service");
|
|
B();
|
|
}
|
|
}
|
|
|
|
private final boolean J() {
|
|
c();
|
|
return true;
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public final void K() {
|
|
f();
|
|
e().B().a("Processing queued up service tasks", Integer.valueOf(this.h.size()));
|
|
Iterator<Runnable> it = this.h.iterator();
|
|
while (it.hasNext()) {
|
|
try {
|
|
it.next().run();
|
|
} catch (Exception e) {
|
|
e().t().a("Task exception while flushing queue", e);
|
|
}
|
|
}
|
|
this.h.clear();
|
|
this.i.a();
|
|
}
|
|
|
|
public final void B() {
|
|
f();
|
|
w();
|
|
this.c.a();
|
|
try {
|
|
ConnectionTracker.a().a(b(), this.c);
|
|
} catch (IllegalArgumentException | IllegalStateException unused) {
|
|
}
|
|
this.d = null;
|
|
}
|
|
|
|
public final boolean C() {
|
|
f();
|
|
w();
|
|
return this.d != null;
|
|
}
|
|
|
|
/* JADX WARN: Removed duplicated region for block: B:18:0x00f3 */
|
|
/* JADX WARN: Removed duplicated region for block: B:22:0x010d */
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct code enable 'Show inconsistent code' option in preferences
|
|
*/
|
|
final void D() {
|
|
/*
|
|
Method dump skipped, instructions count: 391
|
|
To view this dump change 'Code comments level' option to 'DEBUG'
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.measurement.internal.zzeb.D():void");
|
|
}
|
|
|
|
protected final void E() {
|
|
f();
|
|
w();
|
|
a(new zzeh(this, a(true)));
|
|
}
|
|
|
|
protected final void F() {
|
|
f();
|
|
w();
|
|
a(new zzel(this, a(true)));
|
|
}
|
|
|
|
final Boolean G() {
|
|
return this.e;
|
|
}
|
|
|
|
final void a(zzaj zzajVar, AbstractSafeParcelable abstractSafeParcelable, zzk zzkVar) {
|
|
int i;
|
|
List<AbstractSafeParcelable> a;
|
|
f();
|
|
g();
|
|
w();
|
|
boolean J = J();
|
|
int i2 = 0;
|
|
int i3 = 100;
|
|
while (i2 < 1001 && i3 == 100) {
|
|
ArrayList arrayList = new ArrayList();
|
|
if (!J || (a = t().a(100)) == null) {
|
|
i = 0;
|
|
} else {
|
|
arrayList.addAll(a);
|
|
i = a.size();
|
|
}
|
|
if (abstractSafeParcelable != null && i < 100) {
|
|
arrayList.add(abstractSafeParcelable);
|
|
}
|
|
int size = arrayList.size();
|
|
int i4 = 0;
|
|
while (i4 < size) {
|
|
Object obj = arrayList.get(i4);
|
|
i4++;
|
|
AbstractSafeParcelable abstractSafeParcelable2 = (AbstractSafeParcelable) obj;
|
|
if (abstractSafeParcelable2 instanceof zzag) {
|
|
try {
|
|
zzajVar.a((zzag) abstractSafeParcelable2, zzkVar);
|
|
} catch (RemoteException e) {
|
|
e().t().a("Failed to send event to the service", e);
|
|
}
|
|
} else if (abstractSafeParcelable2 instanceof zzfv) {
|
|
try {
|
|
zzajVar.a((zzfv) abstractSafeParcelable2, zzkVar);
|
|
} catch (RemoteException e2) {
|
|
e().t().a("Failed to send attribute to the service", e2);
|
|
}
|
|
} else if (abstractSafeParcelable2 instanceof zzo) {
|
|
try {
|
|
zzajVar.a((zzo) abstractSafeParcelable2, zzkVar);
|
|
} catch (RemoteException e3) {
|
|
e().t().a("Failed to send conditional property to the service", e3);
|
|
}
|
|
} else {
|
|
e().t().a("Discarding data. Unrecognized parcel type.");
|
|
}
|
|
}
|
|
i2++;
|
|
i3 = i;
|
|
}
|
|
}
|
|
|
|
@Override // com.google.android.gms.measurement.internal.zzf
|
|
protected final boolean y() {
|
|
return false;
|
|
}
|
|
|
|
protected final void a(zzag zzagVar, String str) {
|
|
Preconditions.a(zzagVar);
|
|
f();
|
|
w();
|
|
boolean J = J();
|
|
a(new zzem(this, J, J && t().a(zzagVar), zzagVar, a(true), str));
|
|
}
|
|
|
|
protected final void a(zzo zzoVar) {
|
|
Preconditions.a(zzoVar);
|
|
f();
|
|
w();
|
|
c();
|
|
a(new zzen(this, true, t().a(zzoVar), new zzo(zzoVar), a(true), zzoVar));
|
|
}
|
|
|
|
protected final void a(AtomicReference<List<zzo>> atomicReference, String str, String str2, String str3) {
|
|
f();
|
|
w();
|
|
a(new zzeo(this, atomicReference, str, str2, str3, a(false)));
|
|
}
|
|
|
|
protected final void a(AtomicReference<List<zzfv>> atomicReference, String str, String str2, String str3, boolean z) {
|
|
f();
|
|
w();
|
|
a(new zzep(this, atomicReference, str, str2, str3, z, a(false)));
|
|
}
|
|
|
|
protected final void a(zzfv zzfvVar) {
|
|
f();
|
|
w();
|
|
a(new zzer(this, J() && t().a(zzfvVar), zzfvVar, a(true)));
|
|
}
|
|
|
|
public final void a(AtomicReference<String> atomicReference) {
|
|
f();
|
|
w();
|
|
a(new zzef(this, atomicReference, a(false)));
|
|
}
|
|
|
|
protected final void a(zzdx zzdxVar) {
|
|
f();
|
|
w();
|
|
a(new zzei(this, zzdxVar));
|
|
}
|
|
|
|
protected final void a(zzaj zzajVar) {
|
|
f();
|
|
Preconditions.a(zzajVar);
|
|
this.d = zzajVar;
|
|
H();
|
|
K();
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public final void a(ComponentName componentName) {
|
|
f();
|
|
if (this.d != null) {
|
|
this.d = null;
|
|
e().B().a("Disconnected from device MeasurementService", componentName);
|
|
f();
|
|
D();
|
|
}
|
|
}
|
|
|
|
private final void a(Runnable runnable) throws IllegalStateException {
|
|
f();
|
|
if (C()) {
|
|
runnable.run();
|
|
} else {
|
|
if (this.h.size() >= 1000) {
|
|
e().t().a("Discarding data. Max runnable queue size reached");
|
|
return;
|
|
}
|
|
this.h.add(runnable);
|
|
this.i.a(60000L);
|
|
D();
|
|
}
|
|
}
|
|
|
|
private final zzk a(boolean z) {
|
|
c();
|
|
return q().a(z ? e().C() : null);
|
|
}
|
|
|
|
static /* synthetic */ zzaj a(zzeb zzebVar, zzaj zzajVar) {
|
|
zzebVar.d = null;
|
|
return null;
|
|
}
|
|
}
|