Mark the recovery key as sensitive when copying it to the clipboard

The recovery key was copied without EXTRA_IS_SENSITIVE, so Android 13+
showed it in the clipboard preview and keyboards could store it in
their clipboard history.

Add an isSensitive option to CopyToClipboardUseCase and
Context.copyToClipboard, and set it when copying the recovery key.
This commit is contained in:
Bardi Harborow
2026-10-04 20:24:22 +11:00
parent a6d9d27c68
commit f59f5da64c
3 changed files with 27 additions and 5 deletions
@@ -122,6 +122,7 @@ private fun Content(
context.copyToClipboard(
text = formattedRecoveryKey,
toastMessage = toastMessage,
isSensitive = true,
)
state.eventSink.invoke(SecureBackupSetupEvent.RecoveryKeyHasBeenSaved)
}