Fix quality issue.
This commit is contained in:
parent
ef11ce1100
commit
f85239518c
2 changed files with 2 additions and 1 deletions
|
|
@ -72,7 +72,7 @@ class PinUnlockPresenter(
|
||||||
if (pinCodeSize == null) {
|
if (pinCodeSize == null) {
|
||||||
// No pin code set, deleted store? Force sign out
|
// No pin code set, deleted store? Force sign out
|
||||||
showSignOutPrompt = true
|
showSignOutPrompt = true
|
||||||
throw Exception("No pin code size found")
|
error("No pin code size found")
|
||||||
} else {
|
} else {
|
||||||
PinEntry.createEmpty(pinCodeSize)
|
PinEntry.createEmpty(pinCodeSize)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@ class KeyStoreSecretKeyRepository(
|
||||||
) : SecretKeyRepository {
|
) : SecretKeyRepository {
|
||||||
private val hasKeyMap = ConcurrentHashMap<String, MutableStateFlow<Boolean>>()
|
private val hasKeyMap = ConcurrentHashMap<String, MutableStateFlow<Boolean>>()
|
||||||
|
|
||||||
|
@Suppress("RunCatchingNotAllowed")
|
||||||
override fun hasKey(alias: String): Flow<Boolean> {
|
override fun hasKey(alias: String): Flow<Boolean> {
|
||||||
return hasKeyMap.getOrPut(alias) {
|
return hasKeyMap.getOrPut(alias) {
|
||||||
MutableStateFlow(runCatching { keyStore.containsAlias(alias) }.getOrDefault(false))
|
MutableStateFlow(runCatching { keyStore.containsAlias(alias) }.getOrDefault(false))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue