package com.google.android.gms.measurement.internal; import com.google.android.gms.common.internal.Preconditions; import java.util.concurrent.Callable; import java.util.concurrent.FutureTask; import java.util.concurrent.atomic.AtomicLong; /* loaded from: classes.dex */ final class zzbu extends FutureTask implements Comparable { private final long a; final boolean b; private final String c; private final /* synthetic */ zzbr d; /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ zzbu(zzbr zzbrVar, Callable callable, boolean z, String str) { super(callable); AtomicLong atomicLong; this.d = zzbrVar; Preconditions.a(str); atomicLong = zzbr.l; this.a = atomicLong.getAndIncrement(); this.c = str; this.b = z; if (this.a == Long.MAX_VALUE) { zzbrVar.e().t().a("Tasks index overflow"); } } @Override // java.lang.Comparable public final /* synthetic */ int compareTo(zzbu zzbuVar) { zzbu zzbuVar2 = zzbuVar; boolean z = this.b; if (z != zzbuVar2.b) { return z ? -1 : 1; } long j = this.a; long j2 = zzbuVar2.a; if (j < j2) { return -1; } if (j > j2) { return 1; } this.d.e().u().a("Two tasks share the same index. index", Long.valueOf(this.a)); return 0; } @Override // java.util.concurrent.FutureTask protected final void setException(Throwable th) { this.d.e().t().a(this.c, th); super.setException(th); } /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ zzbu(zzbr zzbrVar, Runnable runnable, boolean z, String str) { super(runnable, null); AtomicLong atomicLong; this.d = zzbrVar; Preconditions.a(str); atomicLong = zzbr.l; this.a = atomicLong.getAndIncrement(); this.c = str; this.b = false; if (this.a == Long.MAX_VALUE) { zzbrVar.e().t().a("Tasks index overflow"); } } }