Skip to content

Commit acff19d

Browse files
committed
Add dev setting for clearing previous google import flag
1 parent 510844a commit acff19d

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

autofill/autofill-internal/src/main/java/com/duckduckgo/autofill/internal/AutofillInternalSettingsActivity.kt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,17 @@ class AutofillInternalSettingsActivity : DuckDuckGoActivity() {
316316
}
317317
importCsvLauncher.launch(intent)
318318
}
319+
320+
binding.importPasswordsResetImportedFlagButton.setClickListener {
321+
lifecycleScope.launch(dispatchers.io()) {
322+
autofillStore.hasEverImportedPasswords = false
323+
}
324+
Toast.makeText(
325+
this@AutofillInternalSettingsActivity,
326+
getString(R.string.autofillDevSettingsResetGooglePasswordsImportFlagConfirmation),
327+
Toast.LENGTH_SHORT,
328+
).show()
329+
}
319330
}
320331

321332
private fun configureEngagementEventHandlers() {

autofill/autofill-internal/src/main/res/layout/activity_autofill_internal_settings.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,12 @@
124124
android:layout_height="wrap_content"
125125
app:primaryText="@string/autofillDevSettingsImportPasswordsImportPasswordsCsvTitle" />
126126

127+
<com.duckduckgo.common.ui.view.listitem.TwoLineListItem
128+
android:id="@+id/importPasswordsResetImportedFlagButton"
129+
android:layout_width="match_parent"
130+
android:layout_height="wrap_content"
131+
app:primaryText="@string/autofillDevSettingsResetGooglePasswordsImportFlagTitle"
132+
app:secondaryText="@string/autofillDevSettingsResetGooglePasswordsImportFlagInstruction" />
127133

128134
<com.duckduckgo.common.ui.view.divider.HorizontalDivider
129135
android:layout_width="match_parent"

autofill/autofill-internal/src/main/res/values/donottranslate.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@
4444
<string name="autofillDevSettingsImportPasswordsExportPasswordsImportFlowTitle">Launch Google Passwords (import flow)</string>
4545
<string name="autofillDevSettingsImportPasswordsImportPasswordsCsvTitle">Import CSV</string>
4646
<string name="autofillDevSettingsImportGooglePasswordsSuccessMessage" instruction="Placeholder is the number of passwords we were able to import">%1$d passwords imported from Google</string>
47+
<string name="autofillDevSettingsResetGooglePasswordsImportFlagTitle">Previous Google Imports</string>
48+
<string name="autofillDevSettingsResetGooglePasswordsImportFlagInstruction">Tap to forget previous imports</string>
49+
<string name="autofillDevSettingsResetGooglePasswordsImportFlagConfirmation">Eligible to see Google Import promos again</string>
4750

4851
<string name="autofillDevSettingsOverrideMaxInstallDialogTitle">Maximum number of days since install</string>
4952
<string name="autofillDevSettingsOverrideMaxInstallDialogOkButtonText">OK</string>

0 commit comments

Comments
 (0)