what-the-bank/sources/com/kofax/mobile/sdk/_internal/capture/CaptureCriteria.java

132 lines
3.3 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.kofax.mobile.sdk._internal.capture;
import com.kofax.kmc.kut.utilities.error.ErrorInfo;
import com.kofax.kmc.kut.utilities.error.KmcRuntimeException;
/* loaded from: classes3.dex */
public class CaptureCriteria {
private boolean mr = true;
private int ms = 95;
private boolean mt = true;
private int mu = 15;
private boolean mv = true;
private int mw = 15;
private boolean mx = true;
private boolean my = true;
private boolean ts = true;
private double tt = 1.0d;
private boolean tu = true;
public CaptureCriteria() {
}
CaptureCriteria(CaptureCriteria captureCriteria) {
setFocusEnabled(captureCriteria.isFocusEnabled());
setStabilityThresholdEnabled(captureCriteria.isStabilityThresholdEnabled());
setStabilityThreshold(captureCriteria.getStabilityThreshold());
setRollThresholdEnabled(captureCriteria.isRollThresholdEnabled());
setRollThreshold(captureCriteria.getRollThreshold());
setPitchThresholdEnabled(captureCriteria.isPitchThresholdEnabled());
setPitchThreshold(captureCriteria.getPitchThreshold());
setOrientationEnabled(captureCriteria.isOrientationEnabled());
setRefocusBeforeCaptureEnabled(captureCriteria.isRefocusBeforeCaptureEnabled());
}
public void setStabilityThreshold(int i) {
if (i < 0 || i > 100) {
throw new KmcRuntimeException(ErrorInfo.KMC_UI_INVALID_STABILITY_DELAY_ARGUMENT);
}
this.ms = i;
}
public void setPitchThreshold(int i) {
if (i < 0 || i > 45) {
throw new KmcRuntimeException(ErrorInfo.KMC_UI_INVALID_THRESHOLD_ARGUMENT);
}
this.mu = i;
}
public void setRollThreshold(int i) {
if (i < 0 || i > 45) {
throw new KmcRuntimeException(ErrorInfo.KMC_UI_INVALID_THRESHOLD_ARGUMENT);
}
this.mw = i;
}
public void setHoldSteadyDelay(double d) {
this.tt = Math.min(Math.max(d, 0.0d), 3.0d);
}
public void setStabilityThresholdEnabled(boolean z) {
this.mr = z;
}
public void setRollThresholdEnabled(boolean z) {
this.mv = z;
}
public void setRefocusBeforeCaptureEnabled(boolean z) {
this.ts = z;
}
public void setPitchThresholdEnabled(boolean z) {
this.mt = z;
}
public void setPageDetectionEnabled(boolean z) {
this.tu = z;
}
public void setOrientationEnabled(boolean z) {
this.my = z;
}
public void setFocusEnabled(boolean z) {
this.mx = z;
}
public boolean isStabilityThresholdEnabled() {
return this.mr;
}
public boolean isRollThresholdEnabled() {
return this.mv;
}
public boolean isRefocusBeforeCaptureEnabled() {
return this.ts;
}
public boolean isPitchThresholdEnabled() {
return this.mt;
}
public boolean isPageDetectionEnabled() {
return this.tu;
}
public boolean isOrientationEnabled() {
return this.my;
}
public boolean isFocusEnabled() {
return this.mx;
}
public int getStabilityThreshold() {
return this.ms;
}
public int getRollThreshold() {
return this.mw;
}
public int getPitchThreshold() {
return this.mu;
}
public double getHoldSteadyDelay() {
return this.tt;
}
}