70 lines
1.7 KiB
Java
70 lines
1.7 KiB
Java
package c.i.a.f.n;
|
|
|
|
import androidx.annotation.NonNull;
|
|
import java.util.concurrent.ExecutionException;
|
|
/* compiled from: com.google.android.gms:play-services-tasks@@17.2.0 */
|
|
public final class j implements h {
|
|
public final Object a = new Object();
|
|
public final int b;
|
|
|
|
/* renamed from: c reason: collision with root package name */
|
|
public final b0<Void> f1221c;
|
|
public int d;
|
|
public int e;
|
|
public int f;
|
|
public Exception g;
|
|
public boolean h;
|
|
|
|
public j(int i, b0<Void> b0Var) {
|
|
this.b = i;
|
|
this.f1221c = b0Var;
|
|
}
|
|
|
|
public final void a() {
|
|
if (this.d + this.e + this.f != this.b) {
|
|
return;
|
|
}
|
|
if (this.g != null) {
|
|
b0<Void> b0Var = this.f1221c;
|
|
int i = this.e;
|
|
int i2 = this.b;
|
|
StringBuilder sb = new StringBuilder(54);
|
|
sb.append(i);
|
|
sb.append(" out of ");
|
|
sb.append(i2);
|
|
sb.append(" underlying tasks failed");
|
|
b0Var.s(new ExecutionException(sb.toString(), this.g));
|
|
} else if (this.h) {
|
|
this.f1221c.u();
|
|
} else {
|
|
this.f1221c.t(null);
|
|
}
|
|
}
|
|
|
|
@Override // c.i.a.f.n.b
|
|
public final void b() {
|
|
synchronized (this.a) {
|
|
this.f++;
|
|
this.h = true;
|
|
a();
|
|
}
|
|
}
|
|
|
|
@Override // c.i.a.f.n.d
|
|
public final void onFailure(@NonNull Exception exc) {
|
|
synchronized (this.a) {
|
|
this.e++;
|
|
this.g = exc;
|
|
a();
|
|
}
|
|
}
|
|
|
|
@Override // c.i.a.f.n.e
|
|
public final void onSuccess(Object obj) {
|
|
synchronized (this.a) {
|
|
this.d++;
|
|
a();
|
|
}
|
|
}
|
|
}
|