Skip to content

Commit 2c75f41

Browse files
committed
Fix lint false positive
1 parent 83084f6 commit 2c75f41

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

vector/src/main/java/im/vector/app/features/pin/lockscreen/biometrics/BiometricHelper.kt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,9 @@ class BiometricHelper @AssistedInject constructor(
157157

158158
@OptIn(DelicateCoroutinesApi::class)
159159
private fun authenticateInternal(
160-
activity: FragmentActivity,
161-
checkSystemKeyExists: Boolean,
162-
cryptoObject: BiometricPrompt.CryptoObject,
160+
activity: FragmentActivity,
161+
checkSystemKeyExists: Boolean,
162+
cryptoObject: BiometricPrompt.CryptoObject,
163163
): Flow<Boolean> {
164164
if (checkSystemKeyExists && !isSystemAuthEnabledAndValid) return flowOf(false)
165165

@@ -195,9 +195,9 @@ class BiometricHelper @AssistedInject constructor(
195195

196196
@VisibleForTesting(otherwise = PRIVATE)
197197
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>,
201201
): BiometricPrompt {
202202
val executor = ContextCompat.getMainExecutor(context)
203203
val callback = createSuspendingAuthCallback(channel, executor.asCoroutineDispatcher())
@@ -314,9 +314,9 @@ class BiometricHelper @AssistedInject constructor(
314314
fallbackFragment.onDismiss = { cancelPrompt() }
315315
fallbackFragment.authenticationFlow = authenticationFLow
316316

317-
activity.supportFragmentManager.beginTransaction()
317+
val transaction = activity.supportFragmentManager.beginTransaction()
318318
.runOnCommit { scope.launch { showPrompt() } }
319-
.apply { fallbackFragment.show(this, FALLBACK_BIOMETRIC_FRAGMENT_TAG) }
319+
fallbackFragment.show(transaction, FALLBACK_BIOMETRIC_FRAGMENT_TAG)
320320
} else {
321321
scope.launch { showPrompt() }
322322
}

0 commit comments

Comments
 (0)