package com.kofax.mobile.sdk.w; import bolts.CancellationToken; import com.kofax.kmc.ken.engines.data.Image; import com.kofax.kmc.kut.utilities.error.ErrorInfo; import com.kofax.kmc.kut.utilities.error.KmcRuntimeException; /* loaded from: classes3.dex */ public class k extends ae { private final com.kofax.mobile.sdk.c.c PS; private final a PT; /* loaded from: classes3.dex */ public interface a { void a(com.kofax.mobile.sdk.e.a aVar, com.kofax.mobile.sdk.c.a aVar2, Exception exc); String e(com.kofax.mobile.sdk.e.a aVar); Image i(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 k(com.kofax.mobile.sdk.c.c cVar, a aVar) { this.PS = cVar; this.PT = aVar; } @Override // com.kofax.mobile.sdk.w.ae public void a(com.kofax.mobile.sdk.e.a aVar) { com.kofax.mobile.sdk.c.a aVar2 = null; try { aVar2 = f(this.PT.i(aVar), this.PT.e(aVar)); e = null; } catch (Exception e) { e = e; } this.PT.a(aVar, aVar2, e); } private com.kofax.mobile.sdk.c.a f(Image image, String str) { if (image != null) { return g(image, str); } return null; } private com.kofax.mobile.sdk.c.a g(Image image, String str) { com.kofax.mobile.sdk.c.a a2 = this.PS.a(str, image); if (a2 != null) { return a2; } throw new KmcRuntimeException(ErrorInfo.KMC_CL_CLASSIFICATION_CONFIDENCE_LOW); } }