Skip to content

fix(capture-sdk): Fix camera frame color on rotation#944

Merged
abolfazlimahdi merged 2 commits into
PP-3206-RC-bank-SDK-4.4.0from
PP-3219-camera-frame-color-rotation
Jul 13, 2026
Merged

fix(capture-sdk): Fix camera frame color on rotation#944
abolfazlimahdi merged 2 commits into
PP-3206-RC-bank-SDK-4.4.0from
PP-3219-camera-frame-color-rotation

Conversation

@abolfazlimahdi

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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.

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed for 'Android Capture SDK'

Failed conditions
51.4% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed for 'Android Bank SDK'

Failed conditions
2.6% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed for 'Android Capture SDK Default Network'

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@MozhganPeivandianSharbaf MozhganPeivandianSharbaf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, Thank you

@abolfazlimahdi abolfazlimahdi merged commit e1f7f0f into PP-3206-RC-bank-SDK-4.4.0 Jul 13, 2026
28 of 32 checks passed
@abolfazlimahdi abolfazlimahdi deleted the PP-3219-camera-frame-color-rotation branch July 13, 2026 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants