-
Notifications
You must be signed in to change notification settings - Fork 1
feat: block screenshot and recording of sensitive data #587
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
Conversation
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 implements screenshot and screen recording blocking for sensitive screens containing wallet recovery information (mnemonics and passphrases). The feature only applies to release builds, allowing screenshots during development and testing.
Key Changes:
- Created a reusable
BlockScreenshotscomposable that leverages Android'sFLAG_SECUREandsetRecentsScreenshotEnabledAPIs - Applied screenshot blocking to 8 screens handling sensitive wallet data
- Added debug mode bypass to facilitate testing
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| BlockScreenshots.kt | New composable effect that blocks screenshots and screen recording using Android security flags |
| ShowPassphraseScreen.kt | Applied screenshot blocking to passphrase display screen |
| ShowMnemonicScreen.kt | Applied screenshot blocking to mnemonic display screen |
| ConfirmPassphraseScreen.kt | Applied screenshot blocking to passphrase confirmation screen |
| ConfirmMnemonicScreen.kt | Applied screenshot blocking to mnemonic confirmation screen |
| RecoveryMnemonicScreen.kt | Applied screenshot blocking to recovery mnemonic screen |
| RestoreWalletScreen.kt | Applied screenshot blocking to wallet restoration screen |
| CreateWalletWithPassphraseScreen.kt | Applied screenshot blocking to wallet creation with passphrase screen |
app/src/main/java/to/bitkit/ui/shared/effects/BlockScreenshots.kt
Outdated
Show resolved
Hide resolved
ovitrif
left a comment
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.
utAck.
LGTM, testing…
ovitrif
left a comment
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.
tAck
Nice feature 👏🏻
Description
This PR blocks screenshot and recording of sensitive data if the app is not in debug mode
Preview
Screen_recording_20260108_105035.mp4
Screen_recording_20260108_110750.webm
QA Notes
FLAG_SECUREif (Env.isDebug) return