@@ -157,9 +157,9 @@ class BiometricHelper @AssistedInject constructor(
157
157
158
158
@OptIn(DelicateCoroutinesApi ::class )
159
159
private fun authenticateInternal (
160
- activity : FragmentActivity ,
161
- checkSystemKeyExists : Boolean ,
162
- cryptoObject : BiometricPrompt .CryptoObject ,
160
+ activity : FragmentActivity ,
161
+ checkSystemKeyExists : Boolean ,
162
+ cryptoObject : BiometricPrompt .CryptoObject ,
163
163
): Flow <Boolean > {
164
164
if (checkSystemKeyExists && ! isSystemAuthEnabledAndValid) return flowOf(false )
165
165
@@ -195,9 +195,9 @@ class BiometricHelper @AssistedInject constructor(
195
195
196
196
@VisibleForTesting(otherwise = PRIVATE )
197
197
internal fun authenticateWithPromptInternal (
198
- activity : FragmentActivity ,
199
- cryptoObject : BiometricPrompt .CryptoObject ,
200
- channel : Channel <Boolean >,
198
+ activity : FragmentActivity ,
199
+ cryptoObject : BiometricPrompt .CryptoObject ,
200
+ channel : Channel <Boolean >,
201
201
): BiometricPrompt {
202
202
val executor = ContextCompat .getMainExecutor(context)
203
203
val callback = createSuspendingAuthCallback(channel, executor.asCoroutineDispatcher())
@@ -314,9 +314,9 @@ class BiometricHelper @AssistedInject constructor(
314
314
fallbackFragment.onDismiss = { cancelPrompt() }
315
315
fallbackFragment.authenticationFlow = authenticationFLow
316
316
317
- activity.supportFragmentManager.beginTransaction()
317
+ val transaction = activity.supportFragmentManager.beginTransaction()
318
318
.runOnCommit { scope.launch { showPrompt() } }
319
- . apply { fallbackFragment.show(this , FALLBACK_BIOMETRIC_FRAGMENT_TAG ) }
319
+ fallbackFragment.show(transaction , FALLBACK_BIOMETRIC_FRAGMENT_TAG )
320
320
} else {
321
321
scope.launch { showPrompt() }
322
322
}
0 commit comments