74 lines
2.2 KiB
Java
74 lines
2.2 KiB
Java
package c.o.a.n.v;
|
|
|
|
import androidx.annotation.NonNull;
|
|
import c.o.a.n.i;
|
|
import c.o.a.n.v.a;
|
|
import c.o.a.r.g;
|
|
import com.google.android.gms.tasks.Task;
|
|
import java.util.concurrent.CancellationException;
|
|
/* compiled from: CameraOrchestrator */
|
|
public class c implements Runnable {
|
|
public final /* synthetic */ a.c i;
|
|
public final /* synthetic */ g j;
|
|
public final /* synthetic */ a k;
|
|
|
|
/* compiled from: CameraOrchestrator */
|
|
public class a implements c.i.a.f.n.c<T> {
|
|
public a() {
|
|
}
|
|
|
|
@Override // c.i.a.f.n.c
|
|
public void onComplete(@NonNull Task<T> task) {
|
|
Exception k = task.k();
|
|
if (k != null) {
|
|
a.a.a(2, c.this.i.a.toUpperCase(), "- Finished with ERROR.", k);
|
|
c cVar = c.this;
|
|
if (cVar.i.d) {
|
|
i.b(i.this, k, false);
|
|
}
|
|
c.this.i.b.a(k);
|
|
} else if (task.n()) {
|
|
a.a.a(1, c.this.i.a.toUpperCase(), "- Finished because ABORTED.");
|
|
c.this.i.b.a(new CancellationException());
|
|
} else {
|
|
a.a.a(1, c.this.i.a.toUpperCase(), "- Finished.");
|
|
c.this.i.b.b(task.l());
|
|
}
|
|
synchronized (c.this.k.e) {
|
|
c cVar2 = c.this;
|
|
a.a(cVar2.k, cVar2.i);
|
|
}
|
|
}
|
|
}
|
|
|
|
public c(a aVar, a.c cVar, g gVar) {
|
|
this.k = aVar;
|
|
this.i = cVar;
|
|
this.j = gVar;
|
|
}
|
|
|
|
@Override // java.lang.Runnable
|
|
public void run() {
|
|
try {
|
|
a.a.a(1, this.i.a.toUpperCase(), "- Executing.");
|
|
Task task = (Task) this.i.f1498c.call();
|
|
g gVar = this.j;
|
|
a aVar = new a();
|
|
if (task.o()) {
|
|
gVar.c(new d(aVar, task));
|
|
} else {
|
|
task.c(gVar.g, aVar);
|
|
}
|
|
} catch (Exception e) {
|
|
a.a.a(1, this.i.a.toUpperCase(), "- Finished with ERROR.", e);
|
|
if (this.i.d) {
|
|
i.b(i.this, e, false);
|
|
}
|
|
this.i.b.a(e);
|
|
synchronized (this.k.e) {
|
|
a.a(this.k, this.i);
|
|
}
|
|
}
|
|
}
|
|
}
|