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

100 lines
4.4 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.ken.engines.data.CheckSide;
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.a;
import o.InterfaceC13391fZD;
/* loaded from: classes3.dex */
public class CheckCaptureExperience extends DocumentBaseCaptureExperience {
private static final String TAG = "CheckCaptureExperience";
@InterfaceC13391fZD
a mO;
private CheckCaptureExperienceCriteriaHolder mP;
public CheckCaptureExperience(ImageCaptureView imageCaptureView) {
this(imageCaptureView, a((CheckCaptureExperienceCriteriaHolder) null), false);
}
public CheckCaptureExperience(ImageCaptureView imageCaptureView, CheckCaptureExperienceCriteriaHolder checkCaptureExperienceCriteriaHolder) {
this(imageCaptureView, a(checkCaptureExperienceCriteriaHolder), true);
}
private CheckCaptureExperience(ImageCaptureView imageCaptureView, CheckCaptureExperienceCriteriaHolder checkCaptureExperienceCriteriaHolder, boolean z) {
super(imageCaptureView, checkCaptureExperienceCriteriaHolder);
Injector.getInjector(this._ctx.getApplicationContext()).injectMembers(this);
initBase(imageCaptureView, this.mO, checkCaptureExperienceCriteriaHolder);
a(checkCaptureExperienceCriteriaHolder, z);
this._captureController.setUserInstructionMessage(e.b(imageCaptureView.getContext(), "cap_guide_fill_with_check"));
this._captureController.setCenterMessage(e.b(imageCaptureView.getContext(), "cap_guide_center_check"));
}
private void c(Context context) {
if (this.mP.getCheckDetectionSettings().getSide() == CheckSide.BACK) {
setDocumentSampleImage(c.a(context, "check_back_sample"));
} else {
setDocumentSampleImage(c.a(context, "check_sample_rotated"));
}
}
private static CheckCaptureExperienceCriteriaHolder a(CheckCaptureExperienceCriteriaHolder checkCaptureExperienceCriteriaHolder) {
return checkCaptureExperienceCriteriaHolder != null ? checkCaptureExperienceCriteriaHolder : new CheckCaptureExperienceCriteriaHolder();
}
@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 getCheckSampleImage() {
return super.getDocumentSampleImage();
}
public void setCheckSampleImage(Bitmap bitmap) {
super.setDocumentSampleImage(bitmap);
}
public void setCaptureCriteria(CheckCaptureExperienceCriteriaHolder checkCaptureExperienceCriteriaHolder) {
a(checkCaptureExperienceCriteriaHolder, true);
}
private void a(CheckCaptureExperienceCriteriaHolder checkCaptureExperienceCriteriaHolder, boolean z) {
if (checkCaptureExperienceCriteriaHolder == null) {
throw new IllegalArgumentException("criteria is null");
}
CheckCaptureExperienceCriteriaHolder checkCaptureExperienceCriteriaHolder2 = new CheckCaptureExperienceCriteriaHolder(checkCaptureExperienceCriteriaHolder);
this.mP = checkCaptureExperienceCriteriaHolder2;
super.a((DocumentBaseCaptureExperienceCriteriaHolder) checkCaptureExperienceCriteriaHolder2);
this.mO.c(this.mP.getCheckDetectionSettings());
if (this._captureController.hasDocumentSampleImage() || !z) {
return;
}
c(this._ctx);
}
public CheckCaptureExperienceCriteriaHolder getCaptureCriteria() {
return new CheckCaptureExperienceCriteriaHolder(this.mP);
}
}