diff --git a/autofill/autofill-api/src/main/java/com/duckduckgo/autofill/api/AutofillFeature.kt b/autofill/autofill-api/src/main/java/com/duckduckgo/autofill/api/AutofillFeature.kt index 8c38d2fa3275..325636a42439 100644 --- a/autofill/autofill-api/src/main/java/com/duckduckgo/autofill/api/AutofillFeature.kt +++ b/autofill/autofill-api/src/main/java/com/duckduckgo/autofill/api/AutofillFeature.kt @@ -153,5 +153,5 @@ interface AutofillFeature { fun createAsyncPreferences(): Toggle @Toggle.DefaultValue(defaultValue = DefaultFeatureValue.INTERNAL) - fun canPromoteImportPasswords(): Toggle + fun canPromoteImportPasswordsInPasswordManagement(): Toggle } diff --git a/autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/promo/ImportInPasswordsVisibility.kt b/autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/promo/ImportInPasswordsVisibility.kt index 2fb4e9d49dfc..6d6df4a7f3a2 100644 --- a/autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/promo/ImportInPasswordsVisibility.kt +++ b/autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/promo/ImportInPasswordsVisibility.kt @@ -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 @@ -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 diff --git a/autofill/autofill-impl/src/test/java/com/duckduckgo/autofill/impl/importing/promo/RealImportInPasswordsVisibilityTest.kt b/autofill/autofill-impl/src/test/java/com/duckduckgo/autofill/impl/importing/promo/RealImportInPasswordsVisibilityTest.kt index 62eff4131149..dbb2360c7ef4 100644 --- a/autofill/autofill-impl/src/test/java/com/duckduckgo/autofill/impl/importing/promo/RealImportInPasswordsVisibilityTest.kt +++ b/autofill/autofill-impl/src/test/java/com/duckduckgo/autofill/impl/importing/promo/RealImportInPasswordsVisibilityTest.kt @@ -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) }