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; import o.InterfaceC13391fZD; /* loaded from: classes3.dex */ public class ac extends ae { private final com.kofax.mobile.sdk._internal.extraction.id.b Ql; private final a Qm; /* loaded from: classes3.dex */ public interface a { void c(com.kofax.mobile.sdk.e.a aVar, List 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); } @InterfaceC13391fZD public ac(com.kofax.mobile.sdk._internal.extraction.id.b bVar, a aVar) { this.Ql = bVar; this.Qm = aVar; } @Override // com.kofax.mobile.sdk.w.ae public void a(com.kofax.mobile.sdk.e.a aVar) { Image g = this.Qm.g(aVar); String e = this.Qm.e(aVar); String f = this.Qm.f(aVar); if (g == null || f == null) { return; } Capture> capture = new Capture<>(); Capture capture2 = new Capture<>(); a(g, e, f, capture, capture2); this.Qm.c(aVar, (List) capture.get(), (Exception) capture2.get()); } private void a(Image image, String str, String str2, Capture> capture, Capture capture2) { try { this.Ql.b(str, str2, image).continueWith(new Continuation, Void>(this, capture, capture2) { // from class: com.kofax.mobile.sdk.w.ac.1 final Capture Qn; final ac Qo; final Capture zz; { this.Qo = this; this.Qn = capture; this.zz = capture2; } public /* bridge */ /* synthetic */ Object then(Task task) throws Exception { return m321then((Task>) task); } /* renamed from: then, reason: collision with other method in class */ public Void m321then(Task> task) throws Exception { this.Qn.set(task.getResult()); this.zz.set(task.getError()); return null; } }).waitForCompletion(); } catch (InterruptedException e) { capture2.set(e); } } }