1
0
Fork 0

For #13361: Prevent Sentry usage behind isSentryEnabled

master
Matthew Finkel 2020-08-06 19:05:07 +00:00 committed by Mihai Branescu
parent dbc1001d03
commit a1b7e61d36
1 changed files with 2 additions and 1 deletions

View File

@ -272,7 +272,8 @@ class Core(private val context: Context) {
private val passwordsEncryptionKey by lazy {
getSecureAbove22Preferences().getString(PASSWORDS_KEY)
?: generateEncryptionKey(KEY_STRENGTH).also {
if (context.settings().passwordsEncryptionKeyGenerated) {
if (context.settings().passwordsEncryptionKeyGenerated &&
isSentryEnabled()) {
// We already had previously generated an encryption key, but we have lost it
Sentry.capture("Passwords encryption key for passwords storage was lost and we generated a new one")
}