fix(android): keep seed QR sheet screenshot-protected#707
fix(android): keep seed QR sheet screenshot-protected#707kanishka0411 wants to merge 1 commit intobitcoinppl:masterfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis change adds secure-window handling to the seed QR code bottom sheet in the SecretWordsScreen. The modification configures the ModalBottomSheet with Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR adds Confidence Score: 5/5Safe to merge — single-property change that correctly closes the FLAG_SECURE gap on the bottom sheet window. Only one file is changed with a three-line addition using the correct Compose API. The existing activity-level FLAG_SECURE and ScreenSecurity logic is untouched. The sole finding is a P2 style suggestion about the preceding AlertDialog window, which does not expose sensitive data. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant SecretWordsScreen
participant ActivityWindow
participant AlertDialog
participant ModalBottomSheet (QR)
User->>SecretWordsScreen: Navigate to screen
SecretWordsScreen->>ActivityWindow: FLAG_SECURE via DisposableEffect
Note over ActivityWindow: Screenshot blocked ✓
User->>SecretWordsScreen: Tap QR icon
SecretWordsScreen->>AlertDialog: showSeedQrAlert = true
Note over AlertDialog: Separate Dialog window (no seed data shown)
User->>AlertDialog: Confirm Show QR Code
SecretWordsScreen->>ModalBottomSheet (QR): showSeedQrSheet = true
Note over ModalBottomSheet (QR): SecureFlagPolicy.SecureOn FLAG_SECURE on sheet window ✓
User->>ModalBottomSheet (QR): Dismiss
SecretWordsScreen->>ActivityWindow: clearFlags on dispose (if not sensitive)
|
Summary
While checking the Android screenshot-protection follow-up from #684 I noticed the Seed QR is shown through a ModalBottomSheet.
On Android this sheet can be a separate window from the seed words screen, so I made the sheet explicitly request SecureFlagPolicy.SecureOn too. That keeps the QR path covered the same way the recovery-words screen is covered.
Testing
Testing
just build-androidPlatform Coverage
Checklist
Summary by CodeRabbit