86 lines
3.1 KiB
Java
86 lines
3.1 KiB
Java
|
package com.kofax.mobile.sdk.w;
|
||
|
|
||
|
import bolts.CancellationToken;
|
||
|
import bolts.Capture;
|
||
|
import bolts.Continuation;
|
||
|
import bolts.Task;
|
||
|
import com.kofax.kmc.ken.engines.data.BarCodeResult;
|
||
|
import com.kofax.mobile.sdk.extract.id.DataField;
|
||
|
import java.util.ArrayList;
|
||
|
import java.util.List;
|
||
|
import o.gjJ;
|
||
|
|
||
|
/* loaded from: classes3.dex */
|
||
|
public class h extends ae {
|
||
|
private final com.kofax.mobile.sdk._internal.extraction.id.a PK;
|
||
|
private final a PL;
|
||
|
|
||
|
/* loaded from: classes3.dex */
|
||
|
public interface a {
|
||
|
void a(com.kofax.mobile.sdk.e.a aVar, List<List<DataField>> list, List<Exception> list2);
|
||
|
|
||
|
String e(com.kofax.mobile.sdk.e.a aVar);
|
||
|
|
||
|
String f(com.kofax.mobile.sdk.e.a aVar);
|
||
|
|
||
|
List<BarCodeResult> h(com.kofax.mobile.sdk.e.a aVar);
|
||
|
}
|
||
|
|
||
|
@Override // com.kofax.mobile.sdk.w.ae, com.kofax.mobile.sdk.e.c
|
||
|
public /* bridge */ /* synthetic */ void a(Object obj, CancellationToken cancellationToken) {
|
||
|
super.a(obj, cancellationToken);
|
||
|
}
|
||
|
|
||
|
public h(com.kofax.mobile.sdk._internal.extraction.id.a aVar, a aVar2) {
|
||
|
this.PK = aVar;
|
||
|
this.PL = aVar2;
|
||
|
}
|
||
|
|
||
|
@Override // com.kofax.mobile.sdk.w.ae
|
||
|
public void a(com.kofax.mobile.sdk.e.a aVar) {
|
||
|
String e = this.PL.e(aVar);
|
||
|
String f = this.PL.f(aVar);
|
||
|
for (BarCodeResult barCodeResult : this.PL.h(aVar)) {
|
||
|
if (!gjJ.b((CharSequence) barCodeResult.getValue())) {
|
||
|
ArrayList arrayList = new ArrayList();
|
||
|
Capture capture = new Capture(new ArrayList());
|
||
|
Capture capture2 = new Capture(new ArrayList());
|
||
|
arrayList.add(this.PK.a(e, f, barCodeResult.getValue()).continueWith(new Continuation<List<DataField>, Void>(this, capture2, capture) { // from class: com.kofax.mobile.sdk.w.h.1
|
||
|
final Capture PH;
|
||
|
final h PM;
|
||
|
final Capture zz;
|
||
|
|
||
|
{
|
||
|
this.PM = this;
|
||
|
this.zz = capture2;
|
||
|
this.PH = capture;
|
||
|
}
|
||
|
|
||
|
public /* bridge */ /* synthetic */ Object then(Task task) throws Exception {
|
||
|
return m323then((Task<List<DataField>>) task);
|
||
|
}
|
||
|
|
||
|
/* renamed from: then, reason: collision with other method in class */
|
||
|
public Void m323then(Task<List<DataField>> task) throws Exception {
|
||
|
if (task.isFaulted()) {
|
||
|
((ArrayList) this.zz.get()).add(task.getError());
|
||
|
return null;
|
||
|
}
|
||
|
((ArrayList) this.PH.get()).add(task.getResult());
|
||
|
return null;
|
||
|
}
|
||
|
}));
|
||
|
try {
|
||
|
try {
|
||
|
Task.whenAll(arrayList).waitForCompletion();
|
||
|
} catch (InterruptedException e2) {
|
||
|
((ArrayList) capture2.get()).add(e2);
|
||
|
}
|
||
|
} finally {
|
||
|
this.PL.a(aVar, (List) capture.get(), (List) capture2.get());
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|