Fix quality issue.

This commit is contained in:
Benoit Marty 2026-05-06 11:25:03 +02:00 committed by Benoit Marty
parent 44baa4a383
commit 5269b9787e
2 changed files with 2 additions and 1 deletions

View file

@ -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)
}

View file

@ -37,6 +37,7 @@ class KeyStoreSecretKeyRepository(
) : SecretKeyRepository {
private val hasKeyMap = ConcurrentHashMap<String, MutableStateFlow<Boolean>>()
@Suppress("RunCatchingNotAllowed")
override fun hasKey(alias: String): Flow<Boolean> {
return hasKeyMap.getOrPut(alias) {
MutableStateFlow(runCatching { keyStore.containsAlias(alias) }.getOrDefault(false))