MS-1312 Reset OCR frame flag on screen rotation#1570
MS-1312 Reset OCR frame flag on screen rotation#1570luhmirin-s merged 1 commit intorelease/2026.1.0from
Conversation
|
@alexandr-simprints Pinging you especially, since that is your area of expertise :) |
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug where the OCR process would freeze after a screen rotation. The root cause was that a boolean flag (isRunningOcrOnFrame) used to prevent processing multiple frames simultaneously was not being reset when OCR stopped due to a configuration change, causing the scanner to become permanently blocked.
Changes:
- Added
ocrStopped()method to reset the frame processing flag when OCR is stopped - Called the new method in the
stopOcr()function to ensure flag is reset during configuration changes - Added unit test to verify the flag reset behavior
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| ExternalCredentialScanOcrViewModel.kt | Added new ocrStopped() method to reset isRunningOcrOnFrame flag |
| ExternalCredentialScanOcrFragment.kt | Added call to viewModel.ocrStopped() in stopOcr() method; minor refactoring of when expression |
| ExternalCredentialScanOcrViewModelTest.kt | Added unit test to verify ocrStopped() correctly resets the flag |
...m/simprints/feature/externalcredential/screens/scanocr/ExternalCredentialScanOcrViewModel.kt
Outdated
Show resolved
Hide resolved
...m/simprints/feature/externalcredential/screens/scanocr/ExternalCredentialScanOcrViewModel.kt
Outdated
Show resolved
Hide resolved
…rupted by configuration change
1577410 to
7fab81d
Compare
If we are deploying 2025.4.0 in GG2, it's worth fixing it there, too. |
|
@BurningAXE at this point it would be too much of a hassle with the release pipeline for a rare issue (only when rotating in the specific moment) with a trivial fix (just restart the capture). |
|



JIRA ticket
Will be released in: 2026.1.0
Root cause analysis (for bugfixes only)
First known affected version: 2026.1.0 (could be also 2025.4.0, but it is a too low of a priority to check)
Notable changes
Testing guidance
Additional work checklist