60 lines
2.4 KiB
Java
60 lines
2.4 KiB
Java
package com.kofax.mobile.sdk.capture.id;
|
|
|
|
import com.kofax.mobile.sdk._internal.IImageToByteArray;
|
|
import com.kofax.mobile.sdk._internal.extraction.DataUnit;
|
|
import com.kofax.mobile.sdk._internal.extraction.IDataUnitProcessedListener;
|
|
import com.kofax.mobile.sdk._internal.impl.extraction.j;
|
|
import com.kofax.mobile.sdk._internal.impl.extraction.kta.IKtaSessionIdProviderFactory;
|
|
import com.kofax.mobile.sdk._internal.impl.extraction.kta.e;
|
|
import com.kofax.mobile.sdk._internal.impl.extraction.kta.kmd.JobService;
|
|
import o.InterfaceC13391fZD;
|
|
import o.gjJ;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public class KtaIdExtractor extends e implements IIdExtractionServer {
|
|
private static final String REGION = "Region";
|
|
private static final String STATE = "State";
|
|
private static final String acT = "IDType";
|
|
private static final String acU = "Barcode";
|
|
private IdParameters acR;
|
|
|
|
@InterfaceC13391fZD
|
|
public KtaIdExtractor(IKtaSessionIdProviderFactory iKtaSessionIdProviderFactory, IImageToByteArray iImageToByteArray) {
|
|
super(iKtaSessionIdProviderFactory, iImageToByteArray);
|
|
}
|
|
|
|
@Override // com.kofax.mobile.sdk._internal.impl.extraction.a, com.kofax.mobile.sdk._internal.extraction.IExtractionServer
|
|
public void extract(DataUnit dataUnit, IDataUnitProcessedListener iDataUnitProcessedListener) {
|
|
super.extract(new DataUnit(b(dataUnit).getNotNullImages()), iDataUnitProcessedListener);
|
|
}
|
|
|
|
private DataUnit b(DataUnit dataUnit) {
|
|
return gjJ.a(this.acR.barcode) ? c(dataUnit) : dataUnit;
|
|
}
|
|
|
|
private static DataUnit c(DataUnit dataUnit) {
|
|
return new DataUnit(dataUnit.getNotNullImages()[0]);
|
|
}
|
|
|
|
@Override // com.kofax.mobile.sdk._internal.impl.extraction.kta.e
|
|
public void updateKTARequest(JobService jobService) {
|
|
jobService.updateJsonDocuments(acT, "ID");
|
|
jobService.updateJsonDocuments(acU, j.al(this.acR.barcode));
|
|
jobService.updateJsonDocuments(REGION, IdExtractor.acB.get(this.acR.state.region));
|
|
String str = IdExtractor.acC.get(this.acR.state);
|
|
if (str != null) {
|
|
jobService.updateJsonDocuments(STATE, str);
|
|
}
|
|
}
|
|
|
|
@Override // com.kofax.mobile.sdk.capture.id.IIdExtractionServer
|
|
public void setIdParameters(IdParameters idParameters) {
|
|
this.acR = idParameters;
|
|
}
|
|
|
|
@Override // com.kofax.mobile.sdk._internal.impl.extraction.kta.e
|
|
public String getProcessName() {
|
|
return "KofaxMobileIDCaptureSync";
|
|
}
|
|
}
|