mirror of
https://github.com/bitwarden/android.git
synced 2025-12-10 09:56:45 -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,
|
ForceUpdateKdfSettings,
|
||||||
CipherKeyEncryption,
|
CipherKeyEncryption,
|
||||||
NoLogoutOnKdfChange,
|
NoLogoutOnKdfChange,
|
||||||
|
MigrateMyVaultToMyItems,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -89,6 +90,14 @@ sealed class FlagKey<out T : Any> {
|
|||||||
override val defaultValue: Boolean = false
|
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
|
//region Dummy keys for testing
|
||||||
/**
|
/**
|
||||||
* Data object holding the key for a [Boolean] flag to be used in tests.
|
* Data object holding the key for a [Boolean] flag to be used in tests.
|
||||||
|
|||||||
@ -28,6 +28,10 @@ class FlagKeyTest {
|
|||||||
FlagKey.ForceUpdateKdfSettings.keyName,
|
FlagKey.ForceUpdateKdfSettings.keyName,
|
||||||
"pm-18021-force-update-kdf-settings",
|
"pm-18021-force-update-kdf-settings",
|
||||||
)
|
)
|
||||||
|
assertEquals(
|
||||||
|
FlagKey.MigrateMyVaultToMyItems.keyName,
|
||||||
|
"pm-20558-migrate-myvault-to-myitems",
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -39,6 +43,7 @@ class FlagKeyTest {
|
|||||||
FlagKey.CipherKeyEncryption,
|
FlagKey.CipherKeyEncryption,
|
||||||
FlagKey.BitwardenAuthenticationEnabled,
|
FlagKey.BitwardenAuthenticationEnabled,
|
||||||
FlagKey.ForceUpdateKdfSettings,
|
FlagKey.ForceUpdateKdfSettings,
|
||||||
|
FlagKey.MigrateMyVaultToMyItems,
|
||||||
).all {
|
).all {
|
||||||
!it.defaultValue
|
!it.defaultValue
|
||||||
},
|
},
|
||||||
|
|||||||
@ -29,6 +29,7 @@ fun <T : Any> FlagKey<T>.ListItemContent(
|
|||||||
FlagKey.CipherKeyEncryption,
|
FlagKey.CipherKeyEncryption,
|
||||||
FlagKey.ForceUpdateKdfSettings,
|
FlagKey.ForceUpdateKdfSettings,
|
||||||
FlagKey.NoLogoutOnKdfChange,
|
FlagKey.NoLogoutOnKdfChange,
|
||||||
|
FlagKey.MigrateMyVaultToMyItems,
|
||||||
-> {
|
-> {
|
||||||
@Suppress("UNCHECKED_CAST")
|
@Suppress("UNCHECKED_CAST")
|
||||||
BooleanFlagItem(
|
BooleanFlagItem(
|
||||||
@ -78,4 +79,5 @@ private fun <T : Any> FlagKey<T>.getDisplayLabel(): String = when (this) {
|
|||||||
FlagKey.BitwardenAuthenticationEnabled -> {
|
FlagKey.BitwardenAuthenticationEnabled -> {
|
||||||
stringResource(BitwardenString.bitwarden_authentication_enabled)
|
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="import_format_label_aegis_json">Aegis (.json)</string>
|
||||||
<string name="force_update_kdf_settings">Force update KDF settings</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="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 -->
|
<!-- endregion Debug Menu -->
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user