[MS-1164] Multi-Factor ID. OCR Scanner screen#1379
Conversation
…ments (camera, image analyzer) are no longer passed to the ViewModel so that configuration changes can be properly applied. Same with permissions
| import javax.inject.Inject | ||
| import kotlin.math.min | ||
|
|
||
| internal class CalculateLevenshteinDistanceUseCase @Inject constructor() { |
There was a problem hiding this comment.
Could this be done as a top-level function directly? Could skip some of the injection overhead for a purely mathematical function.
There was a problem hiding this comment.
I'd rather keep the Levenshtein Distance calculations as a separate use case for testing isolation purposes. Declaring a single injectable field doesn't seem like a great injection overhead
There was a problem hiding this comment.
Having this as a function does not hurt testing since it is a pure function - it can be tested the same way, and there is no need to mock it since there are no internal dependencies.
… to avoid unnecessary computations when strings are equal
luhmirin-s
left a comment
There was a problem hiding this comment.
LGTM, rest of the comments are nice-to-haves.
…ement. 'return' usually for the closest scope block, which in this case is the "forEach"
…It now accepts target length of the credential to filter out incorrect readouts from the pool
… to avoid extra calculationsˆ
|



JIRA ticket
Will be released in: 2025.4.0
Notable changes
Implementation of the document scanner that uses OCR (Optical Character Recognition) approach to extract an external credential from the document using Google's ML kit.
Additional work checklist