fix(capture-sdk): Fix camera frame color on rotation#944
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses a UI regression in the capture SDK where the camera frame tint could be reset after a configuration change (e.g., rotation) while an “unsupported QR code” popup is still visible, causing the popup-owned frame color to be overwritten by the next “no-IBAN” frame update.
Changes:
- Prevent resetting the camera frame tint when an unsupported/payment QR popup is currently shown.
- Expose a small set of internals (
mUnsupportedQRCodePopup,mImageFrame,mIbanDetectedTextView,handleIBANsDetected) for JVM testing via@VisibleForTesting. - Add Robolectric-based tests covering the “popup shown vs not shown” behavior for IBAN-empty frames.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| capture-sdk/sdk/src/main/java/net/gini/android/capture/camera/CameraFragmentImpl.java | Avoids resetting the camera frame tint while a QR popup is shown, preserving popup-owned color across rotation/restoration scenarios. |
| capture-sdk/sdk/src/test/java/net/gini/android/capture/camera/CameraFragmentImplTest.kt | Adds tests to ensure IBAN-empty frames don’t override the frame tint when the unsupported QR popup is visible, and do reset it otherwise. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
|
MozhganPeivandianSharbaf
left a comment
There was a problem hiding this comment.
Looks good, Thank you
e1f7f0f
into
PP-3206-RC-bank-SDK-4.4.0


PP-3219