mirror of
https://github.com/selfxyz/self.git
synced 2026-02-19 02:24:25 -05:00
SELF-1959: reset isDecoding on OCR failure (#1720)
* add try catch to set isDecoding on failure * call mrz listener with failure * remove redundant log call
This commit is contained in:
@@ -256,11 +256,15 @@ class CameraMLKitFragment(cameraMLKitCallback: CameraMLKitCallback) : CameraFrag
|
||||
if (!isAdded) {
|
||||
return
|
||||
}
|
||||
OcrUtils.processOcr(
|
||||
results = results,
|
||||
timeRequired = timeRequired,
|
||||
callback = mrzListener
|
||||
)
|
||||
try {
|
||||
OcrUtils.processOcr(
|
||||
results = results,
|
||||
timeRequired = timeRequired,
|
||||
callback = mrzListener
|
||||
)
|
||||
} catch (e: Exception) {
|
||||
mrzListener.onFailure(e, timeRequired)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCanceled(timeRequired: Long) {
|
||||
|
||||
Reference in New Issue
Block a user