Skip to content

Rename feature flag, to allow for separate flags for each password import promo #6293

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -153,5 +153,5 @@ interface AutofillFeature {
fun createAsyncPreferences(): Toggle

@Toggle.DefaultValue(defaultValue = DefaultFeatureValue.INTERNAL)
fun canPromoteImportPasswords(): Toggle
fun canPromoteImportPasswordsInPasswordManagement(): Toggle
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import dagger.SingleInstanceIn
import javax.inject.Inject
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Job
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.launch
import logcat.logcat

Expand Down Expand Up @@ -82,7 +81,7 @@ class RealImportInPasswordsVisibility @Inject constructor(
}

private suspend fun evaluateIfUserCanShowImportPromo(): Boolean {
if (autofillFeature.canPromoteImportPasswords().isEnabled().not()) return false
if (autofillFeature.canPromoteImportPasswordsInPasswordManagement().isEnabled().not()) return false

if (internalAutofillStore.hasEverImportedPasswords || internalAutofillStore.hasDismissedImportedPasswordsPromo) return false

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ class RealImportInPasswordsVisibilityTest {
whenever(autofillSelfToggle.isEnabled()).thenReturn(autofillSelfEnabled)
whenever(canImportFromGooglePasswordManagerToggle.isEnabled()).thenReturn(canImportFromGooglePasswordManager)

whenever(autofillFeature.canPromoteImportPasswords()).thenReturn(canPromoteImportPasswordsToggle)
whenever(autofillFeature.canPromoteImportPasswordsInPasswordManagement()).thenReturn(canPromoteImportPasswordsToggle)
whenever(autofillFeature.self()).thenReturn(autofillSelfToggle)
whenever(autofillFeature.canImportFromGooglePasswordManager()).thenReturn(canImportFromGooglePasswordManagerToggle)
}
Expand Down
Loading