mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-12 17:28:54 +03:00
Fix lint false positive
This commit is contained in:
parent
83084f6481
commit
2c75f41072
1 changed files with 8 additions and 8 deletions
|
@ -157,9 +157,9 @@ class BiometricHelper @AssistedInject constructor(
|
||||||
|
|
||||||
@OptIn(DelicateCoroutinesApi::class)
|
@OptIn(DelicateCoroutinesApi::class)
|
||||||
private fun authenticateInternal(
|
private fun authenticateInternal(
|
||||||
activity: FragmentActivity,
|
activity: FragmentActivity,
|
||||||
checkSystemKeyExists: Boolean,
|
checkSystemKeyExists: Boolean,
|
||||||
cryptoObject: BiometricPrompt.CryptoObject,
|
cryptoObject: BiometricPrompt.CryptoObject,
|
||||||
): Flow<Boolean> {
|
): Flow<Boolean> {
|
||||||
if (checkSystemKeyExists && !isSystemAuthEnabledAndValid) return flowOf(false)
|
if (checkSystemKeyExists && !isSystemAuthEnabledAndValid) return flowOf(false)
|
||||||
|
|
||||||
|
@ -195,9 +195,9 @@ class BiometricHelper @AssistedInject constructor(
|
||||||
|
|
||||||
@VisibleForTesting(otherwise = PRIVATE)
|
@VisibleForTesting(otherwise = PRIVATE)
|
||||||
internal fun authenticateWithPromptInternal(
|
internal fun authenticateWithPromptInternal(
|
||||||
activity: FragmentActivity,
|
activity: FragmentActivity,
|
||||||
cryptoObject: BiometricPrompt.CryptoObject,
|
cryptoObject: BiometricPrompt.CryptoObject,
|
||||||
channel: Channel<Boolean>,
|
channel: Channel<Boolean>,
|
||||||
): BiometricPrompt {
|
): BiometricPrompt {
|
||||||
val executor = ContextCompat.getMainExecutor(context)
|
val executor = ContextCompat.getMainExecutor(context)
|
||||||
val callback = createSuspendingAuthCallback(channel, executor.asCoroutineDispatcher())
|
val callback = createSuspendingAuthCallback(channel, executor.asCoroutineDispatcher())
|
||||||
|
@ -314,9 +314,9 @@ class BiometricHelper @AssistedInject constructor(
|
||||||
fallbackFragment.onDismiss = { cancelPrompt() }
|
fallbackFragment.onDismiss = { cancelPrompt() }
|
||||||
fallbackFragment.authenticationFlow = authenticationFLow
|
fallbackFragment.authenticationFlow = authenticationFLow
|
||||||
|
|
||||||
activity.supportFragmentManager.beginTransaction()
|
val transaction = activity.supportFragmentManager.beginTransaction()
|
||||||
.runOnCommit { scope.launch { showPrompt() } }
|
.runOnCommit { scope.launch { showPrompt() } }
|
||||||
.apply { fallbackFragment.show(this, FALLBACK_BIOMETRIC_FRAGMENT_TAG) }
|
fallbackFragment.show(transaction, FALLBACK_BIOMETRIC_FRAGMENT_TAG)
|
||||||
} else {
|
} else {
|
||||||
scope.launch { showPrompt() }
|
scope.launch { showPrompt() }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue