private val passwordsEncryptionKey by lazy { getSecureAbove22Preferences().getString(PASSWORDS_KEY) ?: generateEncryptionKey(KEY_STRENGTH).also { if (context.settings().passwordsEncryptionKeyGenerated) { // 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") } context.settings().recordPasswordsEncryptionKeyGenerated() getSecureAbove22Preferences().putString(PASSWORDS_KEY, it) } }
fun recordIdException(actual: Int?, expected: Int?) { if (isSentryEnabled()) { Sentry.capture("Fragment id $actual did not match expected $expected") } }
We can completely delete the sentry dependency from Fenix without too much difficulty. But the isSentryEnabled() conditional is safe for Tor Browser because we should never provide a SENTRY_TOKEN at build time, so moving (2) into a isSentryEnabled() conditional block should be sufficient.
But the isSentryEnabled() conditional is safe for Tor Browser because we should never provide a SENTRY_TOKEN at build time, so moving (2) into a isSentryEnabled() conditional block should be sufficient.
We should think about how we can test/confirm this remains true in the future.