mirror of
https://github.com/element-hq/element-android
synced 2024-11-23 09:55:40 +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)
|
||||
private fun authenticateInternal(
|
||||
activity: FragmentActivity,
|
||||
checkSystemKeyExists: Boolean,
|
||||
cryptoObject: BiometricPrompt.CryptoObject,
|
||||
activity: FragmentActivity,
|
||||
checkSystemKeyExists: Boolean,
|
||||
cryptoObject: BiometricPrompt.CryptoObject,
|
||||
): Flow<Boolean> {
|
||||
if (checkSystemKeyExists && !isSystemAuthEnabledAndValid) return flowOf(false)
|
||||
|
||||
|
@ -195,9 +195,9 @@ class BiometricHelper @AssistedInject constructor(
|
|||
|
||||
@VisibleForTesting(otherwise = PRIVATE)
|
||||
internal fun authenticateWithPromptInternal(
|
||||
activity: FragmentActivity,
|
||||
cryptoObject: BiometricPrompt.CryptoObject,
|
||||
channel: Channel<Boolean>,
|
||||
activity: FragmentActivity,
|
||||
cryptoObject: BiometricPrompt.CryptoObject,
|
||||
channel: Channel<Boolean>,
|
||||
): BiometricPrompt {
|
||||
val executor = ContextCompat.getMainExecutor(context)
|
||||
val callback = createSuspendingAuthCallback(channel, executor.asCoroutineDispatcher())
|
||||
|
@ -314,9 +314,9 @@ class BiometricHelper @AssistedInject constructor(
|
|||
fallbackFragment.onDismiss = { cancelPrompt() }
|
||||
fallbackFragment.authenticationFlow = authenticationFLow
|
||||
|
||||
activity.supportFragmentManager.beginTransaction()
|
||||
val transaction = activity.supportFragmentManager.beginTransaction()
|
||||
.runOnCommit { scope.launch { showPrompt() } }
|
||||
.apply { fallbackFragment.show(this, FALLBACK_BIOMETRIC_FRAGMENT_TAG) }
|
||||
fallbackFragment.show(transaction, FALLBACK_BIOMETRIC_FRAGMENT_TAG)
|
||||
} else {
|
||||
scope.launch { showPrompt() }
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue