mirror of
https://github.com/bitwarden/android.git
synced 2025-12-10 00:06:22 -06:00
[PM-28442] Added feature flag for migrate myvault to myitems (#6235)
This commit is contained in:
parent
5e3e8a04aa
commit
ca13e615ec
@ -35,6 +35,7 @@ sealed class FlagKey<out T : Any> {
|
||||
ForceUpdateKdfSettings,
|
||||
CipherKeyEncryption,
|
||||
NoLogoutOnKdfChange,
|
||||
MigrateMyVaultToMyItems,
|
||||
)
|
||||
}
|
||||
}
|
||||
@ -89,6 +90,14 @@ sealed class FlagKey<out T : Any> {
|
||||
override val defaultValue: Boolean = false
|
||||
}
|
||||
|
||||
/**
|
||||
* Data object holding the feature flag key for the Migrate My Vault to My Items feature.
|
||||
*/
|
||||
data object MigrateMyVaultToMyItems : FlagKey<Boolean>() {
|
||||
override val keyName: String = "pm-20558-migrate-myvault-to-myitems"
|
||||
override val defaultValue: Boolean = false
|
||||
}
|
||||
|
||||
//region Dummy keys for testing
|
||||
/**
|
||||
* Data object holding the key for a [Boolean] flag to be used in tests.
|
||||
|
||||
@ -28,6 +28,10 @@ class FlagKeyTest {
|
||||
FlagKey.ForceUpdateKdfSettings.keyName,
|
||||
"pm-18021-force-update-kdf-settings",
|
||||
)
|
||||
assertEquals(
|
||||
FlagKey.MigrateMyVaultToMyItems.keyName,
|
||||
"pm-20558-migrate-myvault-to-myitems",
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -39,6 +43,7 @@ class FlagKeyTest {
|
||||
FlagKey.CipherKeyEncryption,
|
||||
FlagKey.BitwardenAuthenticationEnabled,
|
||||
FlagKey.ForceUpdateKdfSettings,
|
||||
FlagKey.MigrateMyVaultToMyItems,
|
||||
).all {
|
||||
!it.defaultValue
|
||||
},
|
||||
|
||||
@ -29,6 +29,7 @@ fun <T : Any> FlagKey<T>.ListItemContent(
|
||||
FlagKey.CipherKeyEncryption,
|
||||
FlagKey.ForceUpdateKdfSettings,
|
||||
FlagKey.NoLogoutOnKdfChange,
|
||||
FlagKey.MigrateMyVaultToMyItems,
|
||||
-> {
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
BooleanFlagItem(
|
||||
@ -78,4 +79,5 @@ private fun <T : Any> FlagKey<T>.getDisplayLabel(): String = when (this) {
|
||||
FlagKey.BitwardenAuthenticationEnabled -> {
|
||||
stringResource(BitwardenString.bitwarden_authentication_enabled)
|
||||
}
|
||||
FlagKey.MigrateMyVaultToMyItems -> stringResource(BitwardenString.migrate_my_vault_to_my_items)
|
||||
}
|
||||
|
||||
@ -38,6 +38,7 @@
|
||||
<string name="import_format_label_aegis_json">Aegis (.json)</string>
|
||||
<string name="force_update_kdf_settings">Force update KDF settings</string>
|
||||
<string name="avoid_logout_on_kdf_change">Avoid logout on KDF change</string>
|
||||
<string name="migrate_my_vault_to_my_items">Migrate My Vault to My Items</string>
|
||||
|
||||
<!-- endregion Debug Menu -->
|
||||
</resources>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user