what-the-bank/sources/com/kofax/mobile/sdk/w/g.java

86 lines
2.9 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
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.Image;
import com.kofax.mobile.sdk.extract.id.DataField;
import java.util.List;
/* loaded from: classes3.dex */
public class g extends ae {
private final com.kofax.mobile.sdk._internal.extraction.id.a PF;
private final a PG;
/* loaded from: classes3.dex */
public interface a {
void a(com.kofax.mobile.sdk.e.a aVar, List<DataField> list, Exception exc);
String e(com.kofax.mobile.sdk.e.a aVar);
String f(com.kofax.mobile.sdk.e.a aVar);
Image g(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 g(com.kofax.mobile.sdk._internal.extraction.id.a aVar, a aVar2) {
this.PF = aVar;
this.PG = aVar2;
}
@Override // com.kofax.mobile.sdk.w.ae
public void a(com.kofax.mobile.sdk.e.a aVar) {
String e = this.PG.e(aVar);
String f = this.PG.f(aVar);
Image g = this.PG.g(aVar);
Capture<List<DataField>> capture = new Capture<>();
Capture<Exception> capture2 = new Capture<>();
if (G(g) && f != null) {
a(e, f, g, capture, capture2);
}
this.PG.a(aVar, (List) capture.get(), (Exception) capture2.get());
}
private boolean G(Image image) {
return (image == null || image.getImageBitmap() == null) ? false : true;
}
private void a(String str, String str2, Image image, Capture<List<DataField>> capture, Capture<Exception> capture2) {
try {
this.PF.a(str, str2, image).continueWith(new Continuation<List<DataField>, Void>(this, capture2, capture) { // from class: com.kofax.mobile.sdk.w.g.1
final Capture PH;
final g PJ;
final Capture zz;
{
this.PJ = this;
this.zz = capture2;
this.PH = capture;
}
public /* bridge */ /* synthetic */ Object then(Task task) throws Exception {
return m322then((Task<List<DataField>>) task);
}
/* renamed from: then, reason: collision with other method in class */
public Void m322then(Task<List<DataField>> task) throws Exception {
if (task.isFaulted()) {
this.zz.set(task.getError());
return null;
}
this.PH.set(task.getResult());
return null;
}
}).waitForCompletion();
} catch (InterruptedException e) {
capture2.set(e);
}
}
}