what-the-bank/sources/com/kofax/mobile/sdk/capture/id/RttiIdExtractor.java

54 lines
2.2 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
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.rtti.RttiExtractor;
import o.InterfaceC13391fZD;
import o.gjJ;
import org.simpleframework.xml.strategy.Name;
/* loaded from: classes3.dex */
public class RttiIdExtractor extends RttiExtractor implements IIdExtractionServer {
private IdParameters acR;
@InterfaceC13391fZD
public RttiIdExtractor(IImageToByteArray iImageToByteArray) {
super(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.rtti.RttiExtractor
public void updateRttiRequest(RttiExtractor.RttiRequest rttiRequest) {
rttiRequest.addStringPart(Name.LABEL, "ID");
rttiRequest.addStringPart("IDType", "ID");
rttiRequest.addStringPart("xExtractFaceImage", "true");
rttiRequest.addStringPart("xExtractSignatureImage", "true");
rttiRequest.addStringPart("xBarcode", j.al(this.acR.barcode));
rttiRequest.addStringPart("xRegion", IdExtractor.acB.get(this.acR.state.region));
rttiRequest.addStringPart("xImageResize", "ID-1");
String str = IdExtractor.acC.get(this.acR.state);
if (str != null) {
rttiRequest.addStringPart("xState", str);
}
}
@Override // com.kofax.mobile.sdk.capture.id.IIdExtractionServer
public void setIdParameters(IdParameters idParameters) {
this.acR = idParameters;
}
}