PM-20150, PM-20151: Remove single tap passkey feature flags (#5585)

This commit is contained in:
David Perez
2025-07-25 13:05:18 -05:00
committed by GitHub
parent 8589a37e5a
commit 91f1180be7
11 changed files with 63 additions and 153 deletions

View File

@@ -16,8 +16,6 @@ import com.x8bit.bitwarden.data.credentials.processor.GET_PASSKEY_INTENT
import com.x8bit.bitwarden.data.credentials.processor.GET_PASSWORD_INTENT import com.x8bit.bitwarden.data.credentials.processor.GET_PASSWORD_INTENT
import com.x8bit.bitwarden.data.credentials.util.setBiometricPromptDataIfSupported import com.x8bit.bitwarden.data.credentials.util.setBiometricPromptDataIfSupported
import com.x8bit.bitwarden.data.platform.manager.BiometricsEncryptionManager import com.x8bit.bitwarden.data.platform.manager.BiometricsEncryptionManager
import com.x8bit.bitwarden.data.platform.manager.FeatureFlagManager
import com.x8bit.bitwarden.data.platform.manager.model.FlagKey
import com.x8bit.bitwarden.ui.platform.manager.intent.IntentManager import com.x8bit.bitwarden.ui.platform.manager.intent.IntentManager
import kotlin.random.Random import kotlin.random.Random
@@ -27,7 +25,6 @@ import kotlin.random.Random
class CredentialEntryBuilderImpl( class CredentialEntryBuilderImpl(
private val context: Context, private val context: Context,
private val intentManager: IntentManager, private val intentManager: IntentManager,
private val featureFlagManager: FeatureFlagManager,
private val biometricsEncryptionManager: BiometricsEncryptionManager, private val biometricsEncryptionManager: BiometricsEncryptionManager,
) : CredentialEntryBuilder { ) : CredentialEntryBuilder {
@@ -91,10 +88,7 @@ class CredentialEntryBuilderImpl(
.also { builder -> .also { builder ->
if (!isUserVerified) { if (!isUserVerified) {
builder.setBiometricPromptDataIfSupported( builder.setBiometricPromptDataIfSupported(
cipher = biometricsEncryptionManager cipher = biometricsEncryptionManager.getOrCreateCipher(userId),
.getOrCreateCipher(userId),
isSingleTapAuthEnabled = featureFlagManager
.getFeatureFlag(FlagKey.SingleTapPasskeyAuthentication),
) )
} }
} }

View File

@@ -53,18 +53,16 @@ object CredentialProviderModule {
dispatcherManager: DispatcherManager, dispatcherManager: DispatcherManager,
intentManager: IntentManager, intentManager: IntentManager,
biometricsEncryptionManager: BiometricsEncryptionManager, biometricsEncryptionManager: BiometricsEncryptionManager,
featureFlagManager: FeatureFlagManager,
clock: Clock, clock: Clock,
): CredentialProviderProcessor = ): CredentialProviderProcessor =
CredentialProviderProcessorImpl( CredentialProviderProcessorImpl(
context, context = context,
authRepository, authRepository = authRepository,
bitwardenCredentialManager, bitwardenCredentialManager = bitwardenCredentialManager,
intentManager, intentManager = intentManager,
clock, clock = clock,
biometricsEncryptionManager, biometricsEncryptionManager = biometricsEncryptionManager,
featureFlagManager, dispatcherManager = dispatcherManager,
dispatcherManager,
) )
@Provides @Provides
@@ -108,12 +106,10 @@ object CredentialProviderModule {
fun provideCredentialEntryBuilder( fun provideCredentialEntryBuilder(
@ApplicationContext context: Context, @ApplicationContext context: Context,
intentManager: IntentManager, intentManager: IntentManager,
featureFlagManager: FeatureFlagManager,
biometricsEncryptionManager: BiometricsEncryptionManager, biometricsEncryptionManager: BiometricsEncryptionManager,
): CredentialEntryBuilder = CredentialEntryBuilderImpl( ): CredentialEntryBuilder = CredentialEntryBuilderImpl(
context = context, context = context,
intentManager = intentManager, intentManager = intentManager,
featureFlagManager = featureFlagManager,
biometricsEncryptionManager = biometricsEncryptionManager, biometricsEncryptionManager = biometricsEncryptionManager,
) )

View File

@@ -33,8 +33,6 @@ import com.x8bit.bitwarden.data.auth.repository.model.UserState
import com.x8bit.bitwarden.data.credentials.manager.BitwardenCredentialManager import com.x8bit.bitwarden.data.credentials.manager.BitwardenCredentialManager
import com.x8bit.bitwarden.data.credentials.model.GetCredentialsRequest import com.x8bit.bitwarden.data.credentials.model.GetCredentialsRequest
import com.x8bit.bitwarden.data.platform.manager.BiometricsEncryptionManager import com.x8bit.bitwarden.data.platform.manager.BiometricsEncryptionManager
import com.x8bit.bitwarden.data.platform.manager.FeatureFlagManager
import com.x8bit.bitwarden.data.platform.manager.model.FlagKey
import com.x8bit.bitwarden.ui.platform.manager.intent.IntentManager import com.x8bit.bitwarden.ui.platform.manager.intent.IntentManager
import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
@@ -60,7 +58,6 @@ class CredentialProviderProcessorImpl(
private val intentManager: IntentManager, private val intentManager: IntentManager,
private val clock: Clock, private val clock: Clock,
private val biometricsEncryptionManager: BiometricsEncryptionManager, private val biometricsEncryptionManager: BiometricsEncryptionManager,
private val featureFlagManager: FeatureFlagManager,
dispatcherManager: DispatcherManager, dispatcherManager: DispatcherManager,
) : CredentialProviderProcessor { ) : CredentialProviderProcessor {
@@ -186,9 +183,9 @@ class CredentialProviderProcessorImpl(
.Builder( .Builder(
accountName = accountName, accountName = accountName,
pendingIntent = intentManager.createFido2CreationPendingIntent( pendingIntent = intentManager.createFido2CreationPendingIntent(
CREATE_PASSKEY_INTENT, action = CREATE_PASSKEY_INTENT,
userId, userId = userId,
requestCode.getAndIncrement(), requestCode = requestCode.getAndIncrement(),
), ),
) )
.setDescription( .setDescription(
@@ -202,9 +199,7 @@ class CredentialProviderProcessorImpl(
.setLastUsedTime(if (isActive) clock.instant() else null) .setLastUsedTime(if (isActive) clock.instant() else null)
.setAutoSelectAllowed(true) .setAutoSelectAllowed(true)
if (isVaultUnlocked && if (isVaultUnlocked) {
featureFlagManager.getFeatureFlag(FlagKey.SingleTapPasskeyCreation)
) {
biometricsEncryptionManager biometricsEncryptionManager
.getOrCreateCipher(userId) .getOrCreateCipher(userId)
?.let { entryBuilder.setBiometricPromptDataIfSupported(cipher = it) } ?.let { entryBuilder.setBiometricPromptDataIfSupported(cipher = it) }

View File

@@ -14,12 +14,8 @@ import javax.crypto.Cipher
*/ */
fun PublicKeyCredentialEntry.Builder.setBiometricPromptDataIfSupported( fun PublicKeyCredentialEntry.Builder.setBiometricPromptDataIfSupported(
cipher: Cipher?, cipher: Cipher?,
isSingleTapAuthEnabled: Boolean,
): PublicKeyCredentialEntry.Builder = ): PublicKeyCredentialEntry.Builder =
if (isBuildVersionAtLeast(Build.VERSION_CODES.VANILLA_ICE_CREAM) && if (isBuildVersionAtLeast(Build.VERSION_CODES.VANILLA_ICE_CREAM) && cipher != null) {
cipher != null &&
isSingleTapAuthEnabled
) {
setBiometricPromptData( setBiometricPromptData(
biometricPromptData = buildPromptDataWithCipher(cipher), biometricPromptData = buildPromptDataWithCipher(cipher),
) )

View File

@@ -24,8 +24,6 @@ sealed class FlagKey<out T : Any> {
EmailVerification, EmailVerification,
CredentialExchangeProtocolImport, CredentialExchangeProtocolImport,
CredentialExchangeProtocolExport, CredentialExchangeProtocolExport,
SingleTapPasskeyCreation,
SingleTapPasskeyAuthentication,
RestrictCipherItemDeletion, RestrictCipherItemDeletion,
UserManagedPrivilegedApps, UserManagedPrivilegedApps,
RemoveCardPolicy, RemoveCardPolicy,
@@ -67,22 +65,6 @@ sealed class FlagKey<out T : Any> {
override val defaultValue: Boolean = false override val defaultValue: Boolean = false
} }
/**
* Data object holding the feature flag key to enable single tap passkey creation.
*/
data object SingleTapPasskeyCreation : FlagKey<Boolean>() {
override val keyName: String = "single-tap-passkey-creation"
override val defaultValue: Boolean = false
}
/**
* Data object holding the feature flag key to enable single tap passkey authentication.
*/
data object SingleTapPasskeyAuthentication : FlagKey<Boolean>() {
override val keyName: String = "single-tap-passkey-authentication"
override val defaultValue: Boolean = false
}
/** /**
* Data object holding the feature flag key to enable the restriction of cipher item deletion * Data object holding the feature flag key to enable the restriction of cipher item deletion
*/ */

View File

@@ -29,8 +29,6 @@ fun <T : Any> FlagKey<T>.ListItemContent(
FlagKey.CredentialExchangeProtocolImport, FlagKey.CredentialExchangeProtocolImport,
FlagKey.CredentialExchangeProtocolExport, FlagKey.CredentialExchangeProtocolExport,
FlagKey.CipherKeyEncryption, FlagKey.CipherKeyEncryption,
FlagKey.SingleTapPasskeyCreation,
FlagKey.SingleTapPasskeyAuthentication,
FlagKey.RestrictCipherItemDeletion, FlagKey.RestrictCipherItemDeletion,
FlagKey.UserManagedPrivilegedApps, FlagKey.UserManagedPrivilegedApps,
FlagKey.RemoveCardPolicy, FlagKey.RemoveCardPolicy,
@@ -79,11 +77,6 @@ private fun <T : Any> FlagKey<T>.getDisplayLabel(): String = when (this) {
FlagKey.CredentialExchangeProtocolImport -> stringResource(BitwardenString.cxp_import) FlagKey.CredentialExchangeProtocolImport -> stringResource(BitwardenString.cxp_import)
FlagKey.CredentialExchangeProtocolExport -> stringResource(BitwardenString.cxp_export) FlagKey.CredentialExchangeProtocolExport -> stringResource(BitwardenString.cxp_export)
FlagKey.CipherKeyEncryption -> stringResource(BitwardenString.cipher_key_encryption) FlagKey.CipherKeyEncryption -> stringResource(BitwardenString.cipher_key_encryption)
FlagKey.SingleTapPasskeyCreation -> stringResource(BitwardenString.single_tap_passkey_creation)
FlagKey.SingleTapPasskeyAuthentication -> {
stringResource(BitwardenString.single_tap_passkey_authentication)
}
FlagKey.RestrictCipherItemDeletion -> stringResource(BitwardenString.restrict_item_deletion) FlagKey.RestrictCipherItemDeletion -> stringResource(BitwardenString.restrict_item_deletion)
FlagKey.UserManagedPrivilegedApps -> { FlagKey.UserManagedPrivilegedApps -> {
stringResource(BitwardenString.user_trusted_privileged_app_management) stringResource(BitwardenString.user_trusted_privileged_app_management)

View File

@@ -13,8 +13,6 @@ import com.bitwarden.fido.Fido2CredentialAutofillView
import com.bitwarden.vault.CipherListView import com.bitwarden.vault.CipherListView
import com.bitwarden.vault.CipherListViewType import com.bitwarden.vault.CipherListViewType
import com.x8bit.bitwarden.data.platform.manager.BiometricsEncryptionManager import com.x8bit.bitwarden.data.platform.manager.BiometricsEncryptionManager
import com.x8bit.bitwarden.data.platform.manager.FeatureFlagManager
import com.x8bit.bitwarden.data.platform.manager.model.FlagKey
import com.x8bit.bitwarden.data.util.mockBuilder import com.x8bit.bitwarden.data.util.mockBuilder
import com.x8bit.bitwarden.data.vault.datasource.sdk.model.createMockCipherListView import com.x8bit.bitwarden.data.vault.datasource.sdk.model.createMockCipherListView
import com.x8bit.bitwarden.data.vault.datasource.sdk.model.createMockFido2CredentialAutofillView import com.x8bit.bitwarden.data.vault.datasource.sdk.model.createMockFido2CredentialAutofillView
@@ -59,14 +57,12 @@ class CredentialEntryBuilderTest {
) )
} returns mockGetPasswordCredentialIntent } returns mockGetPasswordCredentialIntent
} }
private val mockFeatureFlagManager = mockk<FeatureFlagManager>()
private val mockBiometricsEncryptionManager = mockk<BiometricsEncryptionManager>() private val mockBiometricsEncryptionManager = mockk<BiometricsEncryptionManager>()
private val mockBeginGetPublicKeyOption = mockk<BeginGetPublicKeyCredentialOption>() private val mockBeginGetPublicKeyOption = mockk<BeginGetPublicKeyCredentialOption>()
private val mockBeginGetPasswordOption = mockk<BeginGetPasswordOption>() private val mockBeginGetPasswordOption = mockk<BeginGetPasswordOption>()
private val credentialEntryBuilder = CredentialEntryBuilderImpl( private val credentialEntryBuilder = CredentialEntryBuilderImpl(
context = mockContext, context = mockContext,
intentManager = mockIntentManager, intentManager = mockIntentManager,
featureFlagManager = mockFeatureFlagManager,
biometricsEncryptionManager = mockBiometricsEncryptionManager, biometricsEncryptionManager = mockBiometricsEncryptionManager,
) )
private val mockPublicKeyCredentialEntry = mockk<PublicKeyCredentialEntry>(relaxed = true) private val mockPublicKeyCredentialEntry = mockk<PublicKeyCredentialEntry>(relaxed = true)
@@ -144,9 +140,6 @@ class CredentialEntryBuilderTest {
createMockFido2CredentialAutofillView(number = 1), createMockFido2CredentialAutofillView(number = 1),
) )
every {
mockFeatureFlagManager.getFeatureFlag(FlagKey.SingleTapPasskeyAuthentication)
} returns false
every { every {
mockBiometricsEncryptionManager.getOrCreateCipher("userId") mockBiometricsEncryptionManager.getOrCreateCipher("userId")
} returns null } returns null
@@ -183,11 +176,8 @@ class CredentialEntryBuilderTest {
createMockFido2CredentialAutofillView(number = 1), createMockFido2CredentialAutofillView(number = 1),
) )
// Verify biometric prompt data is not set when flag is false, buildVersion is at least 35, // Verify biometric prompt data is not set when buildVersion is at least 35
// and cipher is null. // and cipher is null.
every {
mockFeatureFlagManager.getFeatureFlag(FlagKey.SingleTapPasskeyAuthentication)
} returns false
every { every {
mockBiometricsEncryptionManager.getOrCreateCipher("userId") mockBiometricsEncryptionManager.getOrCreateCipher("userId")
} returns null } returns null
@@ -204,11 +194,7 @@ class CredentialEntryBuilderTest {
anyConstructed<PublicKeyCredentialEntry.Builder>().setBiometricPromptData(any()) anyConstructed<PublicKeyCredentialEntry.Builder>().setBiometricPromptData(any())
} }
// Verify biometric prompt data is not set when flag is true, buildVersion is below 35, and // Verify biometric prompt data is not set when buildVersion is below 35 and cipher is null.
// cipher is null.
every {
mockFeatureFlagManager.getFeatureFlag(FlagKey.SingleTapPasskeyAuthentication)
} returns true
credentialEntryBuilder credentialEntryBuilder
.buildPublicKeyCredentialEntries( .buildPublicKeyCredentialEntries(
userId = "userId", userId = "userId",
@@ -221,7 +207,7 @@ class CredentialEntryBuilderTest {
anyConstructed<PublicKeyCredentialEntry.Builder>().setBiometricPromptData(any()) anyConstructed<PublicKeyCredentialEntry.Builder>().setBiometricPromptData(any())
} }
// Verify biometric prompt data is not set when flag is true, buildVersion is at least 35, // Verify biometric prompt data is not set when buildVersion is at least 35
// and cipher is null // and cipher is null
every { isBuildVersionAtLeast(any()) } returns true every { isBuildVersionAtLeast(any()) } returns true
credentialEntryBuilder credentialEntryBuilder
@@ -250,7 +236,7 @@ class CredentialEntryBuilderTest {
anyConstructed<PublicKeyCredentialEntry.Builder>().setBiometricPromptData(any()) anyConstructed<PublicKeyCredentialEntry.Builder>().setBiometricPromptData(any())
} }
// Verify biometric prompt data is set when flag is true, buildVersion is >= 35, cipher is // Verify biometric prompt data is set when buildVersion is >= 35, cipher is
// not null, and user is not verified // not null, and user is not verified
credentialEntryBuilder credentialEntryBuilder
.buildPublicKeyCredentialEntries( .buildPublicKeyCredentialEntries(

View File

@@ -32,9 +32,7 @@ import com.x8bit.bitwarden.data.auth.repository.model.UserState
import com.x8bit.bitwarden.data.auth.repository.model.VaultUnlockType import com.x8bit.bitwarden.data.auth.repository.model.VaultUnlockType
import com.x8bit.bitwarden.data.credentials.manager.BitwardenCredentialManager import com.x8bit.bitwarden.data.credentials.manager.BitwardenCredentialManager
import com.x8bit.bitwarden.data.platform.manager.BiometricsEncryptionManager import com.x8bit.bitwarden.data.platform.manager.BiometricsEncryptionManager
import com.x8bit.bitwarden.data.platform.manager.FeatureFlagManager
import com.x8bit.bitwarden.data.platform.manager.model.FirstTimeState import com.x8bit.bitwarden.data.platform.manager.model.FirstTimeState
import com.x8bit.bitwarden.data.platform.manager.model.FlagKey
import com.x8bit.bitwarden.ui.platform.manager.intent.IntentManager import com.x8bit.bitwarden.ui.platform.manager.intent.IntentManager
import io.mockk.coEvery import io.mockk.coEvery
import io.mockk.every import io.mockk.every
@@ -74,10 +72,6 @@ class CredentialProviderProcessorTest {
private val intentManager: IntentManager = mockk() private val intentManager: IntentManager = mockk()
private val dispatcherManager: DispatcherManager = FakeDispatcherManager() private val dispatcherManager: DispatcherManager = FakeDispatcherManager()
private val biometricsEncryptionManager: BiometricsEncryptionManager = mockk() private val biometricsEncryptionManager: BiometricsEncryptionManager = mockk()
private val featureFlagManager: FeatureFlagManager = mockk {
every { getFeatureFlag(FlagKey.SingleTapPasskeyCreation) } returns false
every { getFeatureFlag(FlagKey.SingleTapPasskeyAuthentication) } returns false
}
private val cancellationSignal: CancellationSignal = mockk() private val cancellationSignal: CancellationSignal = mockk()
private val clock = FIXED_CLOCK private val clock = FIXED_CLOCK
@@ -85,14 +79,13 @@ class CredentialProviderProcessorTest {
@BeforeEach @BeforeEach
fun setUp() { fun setUp() {
credentialProviderProcessor = CredentialProviderProcessorImpl( credentialProviderProcessor = CredentialProviderProcessorImpl(
context, context = context,
authRepository, authRepository = authRepository,
bitwardenCredentialManager, bitwardenCredentialManager = bitwardenCredentialManager,
intentManager, intentManager = intentManager,
clock, clock = clock,
biometricsEncryptionManager, biometricsEncryptionManager = biometricsEncryptionManager,
featureFlagManager, dispatcherManager = dispatcherManager,
dispatcherManager,
) )
mockkStatic(::isBuildVersionAtLeast) mockkStatic(::isBuildVersionAtLeast)
@@ -144,9 +137,9 @@ class CredentialProviderProcessorTest {
every { callback.onError(capture(captureSlot)) } just runs every { callback.onError(capture(captureSlot)) } just runs
credentialProviderProcessor.processCreateCredentialRequest( credentialProviderProcessor.processCreateCredentialRequest(
request, request = request,
cancellationSignal, cancellationSignal = cancellationSignal,
callback, callback = callback,
) )
verify(exactly = 1) { callback.onError(any()) } verify(exactly = 1) { callback.onError(any()) }
@@ -173,9 +166,9 @@ class CredentialProviderProcessorTest {
every { callback.onError(capture(captureSlot)) } just runs every { callback.onError(capture(captureSlot)) } just runs
credentialProviderProcessor.processCreateCredentialRequest( credentialProviderProcessor.processCreateCredentialRequest(
request, request = request,
cancellationSignal, cancellationSignal = cancellationSignal,
callback, callback = callback,
) )
verify(exactly = 1) { callback.onError(any()) } verify(exactly = 1) { callback.onError(any()) }
@@ -201,9 +194,9 @@ class CredentialProviderProcessorTest {
every { callback.onError(capture(captureSlot)) } just runs every { callback.onError(capture(captureSlot)) } just runs
credentialProviderProcessor.processCreateCredentialRequest( credentialProviderProcessor.processCreateCredentialRequest(
request, request = request,
cancellationSignal, cancellationSignal = cancellationSignal,
callback, callback = callback,
) )
verify(exactly = 1) { callback.onError(any()) } verify(exactly = 1) { callback.onError(any()) }
@@ -228,11 +221,14 @@ class CredentialProviderProcessorTest {
every { context.getString(any(), any()) } returns "mockDescription" every { context.getString(any(), any()) } returns "mockDescription"
every { every {
intentManager.createFido2CreationPendingIntent( intentManager.createFido2CreationPendingIntent(
any(), action = any(),
any(), userId = any(),
any(), requestCode = any(),
) )
} returns mockIntent } returns mockIntent
every {
biometricsEncryptionManager.getOrCreateCipher(userId = any())
} returns mockk<Cipher>()
every { cancellationSignal.setOnCancelListener(any()) } just runs every { cancellationSignal.setOnCancelListener(any()) } just runs
every { request.candidateQueryData } returns candidateQueryData every { request.candidateQueryData } returns candidateQueryData
every { every {
@@ -241,9 +237,9 @@ class CredentialProviderProcessorTest {
every { callback.onResult(capture(captureSlot)) } just runs every { callback.onResult(capture(captureSlot)) } just runs
credentialProviderProcessor.processCreateCredentialRequest( credentialProviderProcessor.processCreateCredentialRequest(
request, request = request,
cancellationSignal, cancellationSignal = cancellationSignal,
callback, callback = callback,
) )
verify(exactly = 1) { callback.onResult(any()) } verify(exactly = 1) { callback.onResult(any()) }
@@ -275,21 +271,20 @@ class CredentialProviderProcessorTest {
every { callback.onResult(capture(captureSlot)) } just runs every { callback.onResult(capture(captureSlot)) } just runs
every { every {
intentManager.createFido2CreationPendingIntent( intentManager.createFido2CreationPendingIntent(
any(), action = any(),
any(), userId = any(),
any(), requestCode = any(),
) )
} returns mockIntent } returns mockIntent
every { every {
biometricsEncryptionManager.getOrCreateCipher(any()) biometricsEncryptionManager.getOrCreateCipher(any())
} returns mockk<Cipher>() } returns mockk<Cipher>()
every { featureFlagManager.getFeatureFlag(FlagKey.SingleTapPasskeyCreation) } returns true
every { isBuildVersionAtLeast(Build.VERSION_CODES.VANILLA_ICE_CREAM) } returns true every { isBuildVersionAtLeast(Build.VERSION_CODES.VANILLA_ICE_CREAM) } returns true
credentialProviderProcessor.processCreateCredentialRequest( credentialProviderProcessor.processCreateCredentialRequest(
request, request = request,
cancellationSignal, cancellationSignal = cancellationSignal,
callback, callback = callback,
) )
verify(exactly = 1) { callback.onResult(any()) } verify(exactly = 1) { callback.onResult(any()) }
@@ -324,24 +319,13 @@ class CredentialProviderProcessorTest {
// Verify entries have no biometric prompt data when cipher is null // Verify entries have no biometric prompt data when cipher is null
every { biometricsEncryptionManager.getOrCreateCipher(any()) } returns null every { biometricsEncryptionManager.getOrCreateCipher(any()) } returns null
credentialProviderProcessor.processCreateCredentialRequest( credentialProviderProcessor.processCreateCredentialRequest(
request, request = request,
cancellationSignal, cancellationSignal = cancellationSignal,
callback, callback = callback,
) )
assertTrue( assertTrue(
captureSlot.captured.createEntries.all { it.biometricPromptData == null }, captureSlot.captured.createEntries.all { it.biometricPromptData == null },
) { "Expected all entries to have null biometric prompt data." } ) { "Expected all entries to have null biometric prompt data." }
// Disable single tap feature flag to verify all entries do not have biometric prompt data
every { featureFlagManager.getFeatureFlag(FlagKey.SingleTapPasskeyCreation) } returns false
credentialProviderProcessor.processCreateCredentialRequest(
request,
cancellationSignal,
callback,
)
assertTrue(
captureSlot.captured.createEntries.all { it.biometricPromptData == null },
) { "Expected all entries to not have biometric prompt data." }
} }
@Test @Test
@@ -362,9 +346,9 @@ class CredentialProviderProcessorTest {
every { callback.onError(capture(captureSlot)) } just runs every { callback.onError(capture(captureSlot)) } just runs
credentialProviderProcessor.processGetCredentialRequest( credentialProviderProcessor.processGetCredentialRequest(
request, request = request,
cancellationSignal, cancellationSignal = cancellationSignal,
callback, callback = callback,
) )
verify(exactly = 1) { callback.onError(any()) } verify(exactly = 1) { callback.onError(any()) }
@@ -412,9 +396,9 @@ class CredentialProviderProcessorTest {
) )
credentialProviderProcessor.processGetCredentialRequest( credentialProviderProcessor.processGetCredentialRequest(
request, request = request,
cancellationSignal, cancellationSignal = cancellationSignal,
callback, callback = callback,
) )
verify(exactly = 0) { callback.onError(any()) } verify(exactly = 0) { callback.onError(any()) }
@@ -461,9 +445,9 @@ class CredentialProviderProcessorTest {
} returns Result.failure(Exception("Error decrypting credentials.")) } returns Result.failure(Exception("Error decrypting credentials."))
credentialProviderProcessor.processGetCredentialRequest( credentialProviderProcessor.processGetCredentialRequest(
request, request = request,
cancellationSignal, cancellationSignal = cancellationSignal,
callback, callback = callback,
) )
verify(exactly = 1) { callback.onError(any()) } verify(exactly = 1) { callback.onError(any()) }
@@ -503,9 +487,9 @@ class CredentialProviderProcessorTest {
every { callback.onResult(capture(captureSlot)) } just runs every { callback.onResult(capture(captureSlot)) } just runs
credentialProviderProcessor.processGetCredentialRequest( credentialProviderProcessor.processGetCredentialRequest(
request, request = request,
cancellationSignal, cancellationSignal = cancellationSignal,
callback, callback = callback,
) )
assertEquals(1, captureSlot.captured.credentialEntries.size) assertEquals(1, captureSlot.captured.credentialEntries.size)

View File

@@ -25,14 +25,6 @@ class FlagKeyTest {
FlagKey.CipherKeyEncryption.keyName, FlagKey.CipherKeyEncryption.keyName,
"cipher-key-encryption", "cipher-key-encryption",
) )
assertEquals(
FlagKey.SingleTapPasskeyCreation.keyName,
"single-tap-passkey-creation",
)
assertEquals(
FlagKey.SingleTapPasskeyAuthentication.keyName,
"single-tap-passkey-authentication",
)
assertEquals( assertEquals(
FlagKey.RestrictCipherItemDeletion.keyName, FlagKey.RestrictCipherItemDeletion.keyName,
"pm-15493-restrict-item-deletion-to-can-manage-permission", "pm-15493-restrict-item-deletion-to-can-manage-permission",
@@ -54,8 +46,6 @@ class FlagKeyTest {
FlagKey.EmailVerification, FlagKey.EmailVerification,
FlagKey.CredentialExchangeProtocolImport, FlagKey.CredentialExchangeProtocolImport,
FlagKey.CredentialExchangeProtocolExport, FlagKey.CredentialExchangeProtocolExport,
FlagKey.SingleTapPasskeyCreation,
FlagKey.SingleTapPasskeyAuthentication,
FlagKey.CipherKeyEncryption, FlagKey.CipherKeyEncryption,
FlagKey.RestrictCipherItemDeletion, FlagKey.RestrictCipherItemDeletion,
FlagKey.UserManagedPrivilegedApps, FlagKey.UserManagedPrivilegedApps,

View File

@@ -147,8 +147,6 @@ private val DEFAULT_MAP_VALUE: ImmutableMap<FlagKey<Any>, Any> = persistentMapOf
FlagKey.EmailVerification to true, FlagKey.EmailVerification to true,
FlagKey.CredentialExchangeProtocolImport to true, FlagKey.CredentialExchangeProtocolImport to true,
FlagKey.CredentialExchangeProtocolExport to true, FlagKey.CredentialExchangeProtocolExport to true,
FlagKey.SingleTapPasskeyCreation to true,
FlagKey.SingleTapPasskeyAuthentication to true,
FlagKey.RestrictCipherItemDeletion to true, FlagKey.RestrictCipherItemDeletion to true,
FlagKey.UserManagedPrivilegedApps to true, FlagKey.UserManagedPrivilegedApps to true,
FlagKey.RemoveCardPolicy to true, FlagKey.RemoveCardPolicy to true,
@@ -158,8 +156,6 @@ private val UPDATED_MAP_VALUE: ImmutableMap<FlagKey<Any>, Any> = persistentMapOf
FlagKey.EmailVerification to false, FlagKey.EmailVerification to false,
FlagKey.CredentialExchangeProtocolImport to false, FlagKey.CredentialExchangeProtocolImport to false,
FlagKey.CredentialExchangeProtocolExport to false, FlagKey.CredentialExchangeProtocolExport to false,
FlagKey.SingleTapPasskeyCreation to false,
FlagKey.SingleTapPasskeyAuthentication to false,
FlagKey.RestrictCipherItemDeletion to false, FlagKey.RestrictCipherItemDeletion to false,
FlagKey.UserManagedPrivilegedApps to false, FlagKey.UserManagedPrivilegedApps to false,
FlagKey.RemoveCardPolicy to false, FlagKey.RemoveCardPolicy to false,

View File

@@ -865,8 +865,6 @@ Do you want to switch to this account?</string>
<string name="you_ll_only_need_to_set_up_authenticator_key">Youll only need to set up Authenticator Key for logins that require two-factor authentication with a code. The key will continuously generate six-digit codes you can use to log in.</string> <string name="you_ll_only_need_to_set_up_authenticator_key">Youll only need to set up Authenticator Key for logins that require two-factor authentication with a code. The key will continuously generate six-digit codes you can use to log in.</string>
<string name="coachmark_3_of_3">3 OF 3</string> <string name="coachmark_3_of_3">3 OF 3</string>
<string name="you_must_add_a_web_address_to_use_autofill_to_access_this_account">You must add a web address to use autofill to access this account.</string> <string name="you_must_add_a_web_address_to_use_autofill_to_access_this_account">You must add a web address to use autofill to access this account.</string>
<string name="single_tap_passkey_creation">Single tap passkey creation</string>
<string name="single_tap_passkey_authentication">Single tap passkey sign-on</string>
<string name="learn_about_new_logins">Learn about new logins</string> <string name="learn_about_new_logins">Learn about new logins</string>
<string name="we_ll_walk_you_through_the_key_features_to_add_a_new_login">We\'ll walk you through the key features to add a new login.</string> <string name="we_ll_walk_you_through_the_key_features_to_add_a_new_login">We\'ll walk you through the key features to add a new login.</string>
<string name="explore_the_generator">Explore the generator</string> <string name="explore_the_generator">Explore the generator</string>