[MS-1315] Handle face detection state loss in ConfirmationFragment#1563
Merged
meladRaouf merged 1 commit intorelease/2026.1.0from Feb 2, 2026
Merged
Conversation
BurningAXE
reviewed
Feb 1, 2026
...apture/src/main/java/com/simprints/face/capture/screens/confirmation/ConfirmationFragment.kt
Outdated
Show resolved
Hide resolved
luhmirin-s
reviewed
Feb 2, 2026
face/capture/src/main/java/com/simprints/face/capture/screens/FaceCaptureViewModel.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
This PR handles face detection state loss in ConfirmationFragment to prevent crashes when the system recreates the fragment after process death. The fix detects when the face detection data is missing and triggers a recapture flow, along with adding validation to prevent empty captures from being finalized.
Changes:
- Added null check in ConfirmationFragment to detect state loss and trigger recapture
- Added validation in FaceCaptureViewModel.flowFinished() to prevent empty captures
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| face/capture/src/main/java/com/simprints/face/capture/screens/confirmation/ConfirmationFragment.kt | Added state loss detection in onViewCreated to check for null detection/bitmap and trigger recapture |
| face/capture/src/main/java/com/simprints/face/capture/screens/FaceCaptureViewModel.kt | Added require() validation to prevent flowFinished() from proceeding with empty format or items |
face/capture/src/main/java/com/simprints/face/capture/screens/FaceCaptureViewModel.kt
Outdated
Show resolved
Hide resolved
face/capture/src/main/java/com/simprints/face/capture/screens/FaceCaptureViewModel.kt
Outdated
Show resolved
Hide resolved
...apture/src/main/java/com/simprints/face/capture/screens/confirmation/ConfirmationFragment.kt
Outdated
Show resolved
Hide resolved
face/capture/src/main/java/com/simprints/face/capture/screens/FaceCaptureViewModel.kt
Outdated
Show resolved
Hide resolved
face/capture/src/main/java/com/simprints/face/capture/screens/FaceCaptureViewModel.kt
Outdated
Show resolved
Hide resolved
...apture/src/main/java/com/simprints/face/capture/screens/confirmation/ConfirmationFragment.kt
Show resolved
Hide resolved
d9f2666 to
a8b338b
Compare
a8b338b to
17ab73d
Compare
|
BurningAXE
approved these changes
Feb 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



JIRA ticket
Will be released in: 2026.1.0
Root cause analysis (for bugfixes only)
First known affected version: Many releases ago
Notable changes
Testing guidance
Additional work checklist