diff --git a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/unlock/PinUnlockPresenter.kt b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/unlock/PinUnlockPresenter.kt index a6e35b6967..c8dd8916f9 100644 --- a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/unlock/PinUnlockPresenter.kt +++ b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/unlock/PinUnlockPresenter.kt @@ -72,7 +72,7 @@ class PinUnlockPresenter( if (pinCodeSize == null) { // No pin code set, deleted store? Force sign out showSignOutPrompt = true - throw Exception("No pin code size found") + error("No pin code size found") } else { PinEntry.createEmpty(pinCodeSize) } diff --git a/libraries/cryptography/impl/src/main/kotlin/io/element/android/libraries/cryptography/impl/KeyStoreSecretKeyRepository.kt b/libraries/cryptography/impl/src/main/kotlin/io/element/android/libraries/cryptography/impl/KeyStoreSecretKeyRepository.kt index dccba2a136..bcd38695c4 100644 --- a/libraries/cryptography/impl/src/main/kotlin/io/element/android/libraries/cryptography/impl/KeyStoreSecretKeyRepository.kt +++ b/libraries/cryptography/impl/src/main/kotlin/io/element/android/libraries/cryptography/impl/KeyStoreSecretKeyRepository.kt @@ -37,6 +37,7 @@ class KeyStoreSecretKeyRepository( ) : SecretKeyRepository { private val hasKeyMap = ConcurrentHashMap>() + @Suppress("RunCatchingNotAllowed") override fun hasKey(alias: String): Flow { return hasKeyMap.getOrPut(alias) { MutableStateFlow(runCatching { keyStore.containsAlias(alias) }.getOrDefault(false))