-
Notifications
You must be signed in to change notification settings - Fork 2
[MS-1315] Handle face detection state loss in ConfirmationFragment #1563
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MS-1315] Handle face detection state loss in ConfirmationFragment #1563
Conversation
...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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.



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