what-the-bank/sources/com/kofax/kmc/kui/uicontrols/captureanimations/PassportCaptureExperience.java

95 lines
4.2 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.kofax.kmc.kui.uicontrols.captureanimations;
import android.content.Context;
import android.graphics.Bitmap;
import com.kofax.kmc.kui.uicontrols.ImageCaptureView;
import com.kofax.mobile.sdk._internal.dagger.Injector;
import com.kofax.mobile.sdk.ak.c;
import com.kofax.mobile.sdk.ak.e;
import com.kofax.mobile.sdk.l.i;
import o.InterfaceC13391fZD;
/* loaded from: classes3.dex */
public class PassportCaptureExperience extends DocumentBaseCaptureExperience {
private static final String TAG = "PassportCaptureExperience";
@InterfaceC13391fZD
i nj;
private PassportCaptureExperienceCriteriaHolder nk;
public PassportCaptureExperience(ImageCaptureView imageCaptureView) {
this(imageCaptureView, a((PassportCaptureExperienceCriteriaHolder) null), false);
}
public PassportCaptureExperience(ImageCaptureView imageCaptureView, PassportCaptureExperienceCriteriaHolder passportCaptureExperienceCriteriaHolder) {
this(imageCaptureView, a(passportCaptureExperienceCriteriaHolder), true);
}
private PassportCaptureExperience(ImageCaptureView imageCaptureView, PassportCaptureExperienceCriteriaHolder passportCaptureExperienceCriteriaHolder, boolean z) {
super(imageCaptureView, passportCaptureExperienceCriteriaHolder);
Injector.getInjector(this._ctx.getApplicationContext()).injectMembers(this);
initBase(imageCaptureView, this.nj, passportCaptureExperienceCriteriaHolder);
a(passportCaptureExperienceCriteriaHolder, z);
this._captureController.setUserInstructionMessage(e.b(imageCaptureView.getContext(), "cap_guide_fill_with_passport"));
this._captureController.setCenterMessage(e.b(imageCaptureView.getContext(), "cap_guide_center_passport"));
}
private void c(Context context) {
setDocumentSampleImage(c.a(context, "passport_sample"));
}
private static PassportCaptureExperienceCriteriaHolder a(PassportCaptureExperienceCriteriaHolder passportCaptureExperienceCriteriaHolder) {
return passportCaptureExperienceCriteriaHolder != null ? passportCaptureExperienceCriteriaHolder : new PassportCaptureExperienceCriteriaHolder();
}
@Override // com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience
public CaptureMessage getUserInstructionMessage() {
return super.getUserInstructionMessage();
}
@Override // com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience
public void setUserInstructionMessage(CaptureMessage captureMessage) {
super.setUserInstructionMessage(captureMessage);
}
@Override // com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience
public CaptureMessage getCenterMessage() {
return super.getCenterMessage();
}
@Override // com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience
public void setCenterMessage(CaptureMessage captureMessage) {
super.setCenterMessage(captureMessage);
}
public Bitmap getPassportSampleImage() {
return super.getDocumentSampleImage();
}
public void setPassportSampleImage(Bitmap bitmap) {
super.setDocumentSampleImage(bitmap);
}
public void setCaptureCriteria(PassportCaptureExperienceCriteriaHolder passportCaptureExperienceCriteriaHolder) {
a(passportCaptureExperienceCriteriaHolder, true);
}
private void a(PassportCaptureExperienceCriteriaHolder passportCaptureExperienceCriteriaHolder, boolean z) {
if (passportCaptureExperienceCriteriaHolder == null) {
throw new IllegalArgumentException("criteria is null");
}
PassportCaptureExperienceCriteriaHolder passportCaptureExperienceCriteriaHolder2 = new PassportCaptureExperienceCriteriaHolder(passportCaptureExperienceCriteriaHolder);
this.nk = passportCaptureExperienceCriteriaHolder2;
super.a((DocumentBaseCaptureExperienceCriteriaHolder) passportCaptureExperienceCriteriaHolder2);
this.nj.c(this.nk.getPassportDetectionSettings());
if (this._captureController.hasDocumentSampleImage() || !z) {
return;
}
c(this._ctx);
}
public PassportCaptureExperienceCriteriaHolder getCaptureCriteria() {
return new PassportCaptureExperienceCriteriaHolder(this.nk);
}
}