alexandroid/decompiled/jadx/sources/com/google/android/gms/tasks/zzaf.java
KaKi87 a47fad5135 📦 Add decompiled Alexa 2.2.730155.0 (jadx, apktool, Hermes strings)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 00:04:16 +01:00

69 lines
1.8 KiB
Java

package com.google.android.gms.tasks;
import androidx.annotation.NonNull;
import java.util.concurrent.ExecutionException;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
/* loaded from: classes7.dex */
final class zzaf<T> implements zzae<T> {
private final Object zza = new Object();
private final int zzb;
private final zzw zzc;
private int zzd;
private int zze;
private int zzf;
private Exception zzg;
private boolean zzh;
public zzaf(int i, zzw zzwVar) {
this.zzb = i;
this.zzc = zzwVar;
}
private final void zza() {
int i = this.zzd;
int i2 = this.zze;
int i3 = i + i2 + this.zzf;
int i4 = this.zzb;
if (i3 == i4) {
if (this.zzg == null) {
boolean z = this.zzh;
zzw zzwVar = this.zzc;
if (z) {
zzwVar.zzc();
return;
} else {
zzwVar.zzb(null);
return;
}
}
this.zzc.zza(new ExecutionException(i2 + " out of " + i4 + " underlying tasks failed", this.zzg));
}
}
@Override // com.google.android.gms.tasks.OnCanceledListener
public final void onCanceled() {
synchronized (this.zza) {
this.zzf++;
this.zzh = true;
zza();
}
}
@Override // com.google.android.gms.tasks.OnFailureListener
public final void onFailure(@NonNull Exception exc) {
synchronized (this.zza) {
this.zze++;
this.zzg = exc;
zza();
}
}
@Override // com.google.android.gms.tasks.OnSuccessListener
public final void onSuccess(T t) {
synchronized (this.zza) {
this.zzd++;
zza();
}
}
}