Skip to content

Commit dbd43b7

Browse files
authored
Release Fireproof login detection (#1137)
* remove experimental variants * move untranslated strings into default strings file * merge translations
1 parent e581821 commit dbd43b7

File tree

31 files changed

+157
-445
lines changed

31 files changed

+157
-445
lines changed

app/src/androidTest/java/com/duckduckgo/app/browser/logindetection/BrowserTabFireproofDialogsEventHandlerTest.kt

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ import com.duckduckgo.app.global.events.db.UserEventsStore
3232
import com.duckduckgo.app.pixels.AppPixelName
3333
import com.duckduckgo.app.runBlocking
3434
import com.duckduckgo.app.settings.db.SettingsDataStore
35-
import com.duckduckgo.app.statistics.Variant
3635
import com.duckduckgo.app.statistics.VariantManager
3736
import com.duckduckgo.app.statistics.pixels.Pixel
3837
import com.nhaarman.mockitokotlin2.mock
@@ -168,17 +167,14 @@ class BrowserTabFireproofDialogsEventHandlerTest {
168167
}
169168

170169
@Test
171-
fun whenExpVariantUserDismissedFireproofLoginDialogwThenRegisterEvent() = coroutineRule.runBlocking {
172-
givenFireproofLoginExperimentEnabled()
173-
170+
fun whenUserDismissedFireproofLoginDialogThenRegisterEvent() = coroutineRule.runBlocking {
174171
testee.onUserDismissedFireproofLoginDialog()
175172

176173
verify(mockUserEventsStore).registerUserEvent(FIREPROOF_LOGIN_DIALOG_DISMISSED)
177174
}
178175

179176
@Test
180-
fun whenExpVariantUserDismissedFireproofLoginDialogTwiceInRowThenAskToDisableLoginDetection() = coroutineRule.runBlocking {
181-
givenFireproofLoginExperimentEnabled()
177+
fun whenUserDismissedFireproofLoginDialogTwiceInRowThenAskToDisableLoginDetection() = coroutineRule.runBlocking {
182178
givenUserPreviouslyDismissedDialog()
183179

184180
testee.onUserDismissedFireproofLoginDialog()
@@ -188,8 +184,7 @@ class BrowserTabFireproofDialogsEventHandlerTest {
188184
}
189185

190186
@Test
191-
fun whenExpVariantUserEnabledFireproofLoginDetectionThenNeverAskToDisableIt() = coroutineRule.runBlocking {
192-
givenFireproofLoginExperimentEnabled()
187+
fun whenUserEnabledFireproofLoginDetectionThenNeverAskToDisableIt() = coroutineRule.runBlocking {
193188
givenUserEnabledFireproofLoginDetection()
194189
givenUserPreviouslyDismissedDialog()
195190

@@ -200,8 +195,7 @@ class BrowserTabFireproofDialogsEventHandlerTest {
200195
}
201196

202197
@Test
203-
fun whenExpVariantUserDidNotDisableLoginDetectionThenNeverAskToDisableItAgain() = coroutineRule.runBlocking {
204-
givenFireproofLoginExperimentEnabled()
198+
fun whenUserDidNotDisableLoginDetectionThenNeverAskToDisableItAgain() = coroutineRule.runBlocking {
205199
givenUserDidNotDisableLoginDetection()
206200
givenUserPreviouslyDismissedDialog()
207201

@@ -294,16 +288,6 @@ class BrowserTabFireproofDialogsEventHandlerTest {
294288
.thenReturn(UserEventEntity(FIREPROOF_LOGIN_DIALOG_DISMISSED))
295289
}
296290

297-
private fun givenFireproofLoginExperimentEnabled() {
298-
whenever(mockVariantManager.getVariant()).thenReturn(
299-
Variant(
300-
key = "",
301-
features = listOf(VariantManager.VariantFeature.LoginDetectionEnabled),
302-
filterBy = { true }
303-
)
304-
)
305-
}
306-
307291
private suspend fun givenUserTriedFireButton() {
308292
whenever(mockUserEventsStore.getUserEvent(FIRE_BUTTON_EXECUTED)).thenReturn(UserEventEntity(FIRE_BUTTON_EXECUTED))
309293
}

app/src/androidTest/java/com/duckduckgo/app/statistics/VariantManagerTest.kt

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -77,22 +77,6 @@ class VariantManagerTest {
7777
}
7878
}
7979

80-
// Fireproof Login experiment
81-
@Test
82-
fun fireproofLoginDetectionControlVariantHasExpectedWeightAndFeatures() {
83-
val variant = variants.first { it.key == "zq" }
84-
assertEqualsDouble(1.0, variant.weight)
85-
assertEquals(0, variant.features.size)
86-
}
87-
88-
@Test
89-
fun fireproofLoginDetectionExperimentVariantHasExpectedWeightAndFeatures() {
90-
val variant = variants.first { it.key == "zw" }
91-
assertEqualsDouble(1.0, variant.weight)
92-
assertEquals(1, variant.features.size)
93-
assertEquals(LoginDetectionEnabled, variant.features[0])
94-
}
95-
9680
@Suppress("SameParameterValue")
9781
private fun assertEqualsDouble(expected: Double, actual: Double) {
9882
val comparison = expected.compareTo(actual)

app/src/main/java/com/duckduckgo/app/browser/logindetection/FireproofDialogsEventHandler.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import com.duckduckgo.app.global.events.db.UserEventsStore
2727
import com.duckduckgo.app.pixels.AppPixelName
2828
import com.duckduckgo.app.settings.db.SettingsDataStore
2929
import com.duckduckgo.app.statistics.VariantManager
30-
import com.duckduckgo.app.statistics.loginDetectionExperimentEnabled
3130
import com.duckduckgo.app.statistics.pixels.Pixel
3231
import kotlinx.coroutines.withContext
3332

@@ -111,8 +110,6 @@ class BrowserTabFireproofDialogsEventHandler constructor(
111110

112111
@Suppress("UnnecessaryVariable")
113112
private suspend fun allowUserToDisableFireproofLoginActive(): Boolean {
114-
if (!variantManager.loginDetectionExperimentEnabled()) return false
115-
116113
val userEnabledLoginDetection = userEventsStore.getUserEvent(UserEventKey.USER_ENABLED_FIREPROOF_LOGIN) != null
117114
val userDismissedDisableFireproofLoginDialog = userEventsStore.getUserEvent(UserEventKey.FIREPROOF_DISABLE_DIALOG_DISMISSED) != null
118115
if (userEnabledLoginDetection || userDismissedDisableFireproofLoginDialog) return false

app/src/main/java/com/duckduckgo/app/settings/db/SettingsDataStore.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import com.duckduckgo.app.settings.clear.ClearWhatOption
2626
import com.duckduckgo.app.settings.clear.ClearWhenOption
2727
import com.duckduckgo.app.settings.clear.FireAnimation
2828
import com.duckduckgo.app.statistics.VariantManager
29-
import com.duckduckgo.app.statistics.loginDetectionExperimentEnabled
3029

3130
interface SettingsDataStore {
3231

@@ -91,7 +90,7 @@ class SettingsSharedPreferences constructor(private val context: Context, privat
9190
set(enabled) = preferences.edit { putBoolean(KEY_AUTOCOMPLETE_ENABLED, enabled) }
9291

9392
override var appLoginDetection: Boolean
94-
get() = preferences.getBoolean(KEY_LOGIN_DETECTION_ENABLED, variantManager.loginDetectionExperimentEnabled())
93+
get() = preferences.getBoolean(KEY_LOGIN_DETECTION_ENABLED, true)
9594
set(enabled) = preferences.edit { putBoolean(KEY_LOGIN_DETECTION_ENABLED, enabled) }
9695

9796
override var appLocationPermission: Boolean

app/src/main/res/values-bg/strings.xml

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<!--
3-
~ Copyright (c) 2020 DuckDuckGo
4-
~
5-
~ Licensed under the Apache License, Version 2.0 (the "License");
6-
~ you may not use this file except in compliance with the License.
7-
~ You may obtain a copy of the License at
8-
~
9-
~ http://www.apache.org/licenses/LICENSE-2.0
10-
~
11-
~ Unless required by applicable law or agreed to in writing, software
12-
~ distributed under the License is distributed on an "AS IS" BASIS,
13-
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
~ See the License for the specific language governing permissions and
15-
~ limitations under the License.
16-
-->
17-
182
<resources xmlns:tools="http://schemas.android.com/tools">
193

204
<string name="appName" translatable="false">DuckDuckGo</string>
215
<string name="appDescription" translatable="false">DuckDuckGo </string>
226
<string name="duckDuckGoLogoDescription">Лого на DuckDuckGo</string>
23-
<string name="duckDuckGoPrivacySimplified">Privacy, simplified</string>
7+
<string name="duckDuckGoPrivacySimplified">Постижима поверителност</string>
248
<string name="yes">Да</string>
259
<string name="no">Не</string>
2610
<string name="open">Отваряне</string>
@@ -223,6 +207,7 @@
223207
<string name="noBookmarks">Все още няма добавени отметки</string>
224208
<string name="bookmarkOverflowContentDescription">Още опции за отметка %1$s</string>
225209
<string name="bookmarkEdited">Добавена е отметка</string>
210+
<string name="bookmarkDeleteConfirmationMessage">Изтрито &lt;b&gt;%1$s&lt;/b&gt;</string>
226211

227212
<!-- Dialogs -->
228213
<string name="dialogConfirmTitle">Потвърдете</string>
@@ -484,6 +469,11 @@
484469
<string name="fireproofWebsiteLoginDialogNegative">Не сега</string>
485470
<string name="fireproofWebsiteItemsSectionTitle">Уебсайтове</string>
486471
<string name="fireproofWebsiteToogleText">Питай при влизане</string>
472+
<string name="disableLoginDetectionDialogTitle">Да се деактивира ли напомняне за огнеустойчивост при вход в сайтове?</string>
473+
<string name="disableLoginDetectionDialogDescription">Можете да промените това предпочитание по всяко време в настройките.</string>
474+
<string name="disableLoginDetectionDialogPositive">ЗАБРАНИ</string>
475+
<string name="disableLoginDetectionDialogNegative">ОТМЕНИ</string>
476+
<string name="fireproofWebsiteRemovalConfirmation">Премахната огнеустойчивост за &lt;b&gt;%1$s&lt;/b&gt;</string>
487477

488478
<!-- Fire Animation settings -->
489479
<string name="settingsFireAnimation">Анимация на огнения бутон</string>

app/src/main/res/values-cs/strings.xml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,4 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<!--
3-
~ Copyright (c) 2020 DuckDuckGo
4-
~
5-
~ Licensed under the Apache License, Version 2.0 (the "License");
6-
~ you may not use this file except in compliance with the License.
7-
~ You may obtain a copy of the License at
8-
~
9-
~ http://www.apache.org/licenses/LICENSE-2.0
10-
~
11-
~ Unless required by applicable law or agreed to in writing, software
12-
~ distributed under the License is distributed on an "AS IS" BASIS,
13-
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
~ See the License for the specific language governing permissions and
15-
~ limitations under the License.
16-
-->
17-
182
<resources xmlns:tools="http://schemas.android.com/tools">
193

204
<string name="appName" translatable="false">DuckDuckGo</string>
@@ -231,6 +215,7 @@
231215
<string name="noBookmarks">Zatím nebyly přidány žádné záložky.</string>
232216
<string name="bookmarkOverflowContentDescription">Další možnosti záložky %1$s</string>
233217
<string name="bookmarkEdited">Záložka přidána</string>
218+
<string name="bookmarkDeleteConfirmationMessage">Odstraněno &lt;b&gt;%1$s&lt;/b&gt;</string>
234219

235220
<!-- Dialogs -->
236221
<string name="dialogConfirmTitle">Potvrdit</string>
@@ -496,6 +481,11 @@
496481
<string name="fireproofWebsiteLoginDialogNegative">Teď ne</string>
497482
<string name="fireproofWebsiteItemsSectionTitle">Webové stránky</string>
498483
<string name="fireproofWebsiteToogleText">Zeptat se při přihlašování</string>
484+
<string name="disableLoginDetectionDialogTitle">Zakázat připomenutí ochrany při přihlašování k webovým stránkám?</string>
485+
<string name="disableLoginDetectionDialogDescription">Tuto předvolbu můžete v Nastavení kdykoli změnit.</string>
486+
<string name="disableLoginDetectionDialogPositive">VYPNOUT</string>
487+
<string name="disableLoginDetectionDialogNegative">ZRUŠIT</string>
488+
<string name="fireproofWebsiteRemovalConfirmation">Ochrana odstraněna pro &lt;b&gt;%1$s&lt;/b&gt;</string>
499489

500490
<!-- Fire Animation settings -->
501491
<string name="settingsFireAnimation">Animace tlačítka pro mazání</string>

app/src/main/res/values-da/strings.xml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,4 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<!--
3-
~ Copyright (c) 2020 DuckDuckGo
4-
~
5-
~ Licensed under the Apache License, Version 2.0 (the "License");
6-
~ you may not use this file except in compliance with the License.
7-
~ You may obtain a copy of the License at
8-
~
9-
~ http://www.apache.org/licenses/LICENSE-2.0
10-
~
11-
~ Unless required by applicable law or agreed to in writing, software
12-
~ distributed under the License is distributed on an "AS IS" BASIS,
13-
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
~ See the License for the specific language governing permissions and
15-
~ limitations under the License.
16-
-->
17-
182
<resources xmlns:tools="http://schemas.android.com/tools">
193

204
<string name="appName" translatable="false">DuckDuckGo</string>
@@ -223,6 +207,7 @@
223207
<string name="noBookmarks">Ingen bogmærker tilføjet endnu</string>
224208
<string name="bookmarkOverflowContentDescription">Flere muligheder for bogmærke %1$s</string>
225209
<string name="bookmarkEdited">Bogmærke tilføjet</string>
210+
<string name="bookmarkDeleteConfirmationMessage">Slettet &lt;b&gt;%1$s&lt;/b&gt;</string>
226211

227212
<!-- Dialogs -->
228213
<string name="dialogConfirmTitle">Bekræft</string>
@@ -484,6 +469,11 @@
484469
<string name="fireproofWebsiteLoginDialogNegative">Ikke nu</string>
485470
<string name="fireproofWebsiteItemsSectionTitle">Websider</string>
486471
<string name="fireproofWebsiteToogleText">Spørg, når der logges ind</string>
472+
<string name="disableLoginDetectionDialogTitle">Vil du deaktivere brandsikker-påmindelse, når du logger ind på websteder?</string>
473+
<string name="disableLoginDetectionDialogDescription">Du kan ændre denne præference til enhver tid i Indstillinger.</string>
474+
<string name="disableLoginDetectionDialogPositive">Deaktiver</string>
475+
<string name="disableLoginDetectionDialogNegative">Afbestil</string>
476+
<string name="fireproofWebsiteRemovalConfirmation">Brandsikring fjernet for &lt;b&gt;%1$s&lt;/b&gt;</string>
487477

488478
<!-- Fire Animation settings -->
489479
<string name="settingsFireAnimation">Ildknap-animation</string>

app/src/main/res/values-de/strings.xml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,4 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<!--
3-
~ Copyright (c) 2020 DuckDuckGo
4-
~
5-
~ Licensed under the Apache License, Version 2.0 (the "License");
6-
~ you may not use this file except in compliance with the License.
7-
~ You may obtain a copy of the License at
8-
~
9-
~ http://www.apache.org/licenses/LICENSE-2.0
10-
~
11-
~ Unless required by applicable law or agreed to in writing, software
12-
~ distributed under the License is distributed on an "AS IS" BASIS,
13-
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
~ See the License for the specific language governing permissions and
15-
~ limitations under the License.
16-
-->
17-
182
<resources xmlns:tools="http://schemas.android.com/tools">
193

204
<string name="appName" translatable="false">DuckDuckGo</string>
@@ -223,6 +207,7 @@
223207
<string name="noBookmarks">Noch keine Lesezeichen hinzugefügt</string>
224208
<string name="bookmarkOverflowContentDescription">Mehr Optionen für Lesezeichen %1$s</string>
225209
<string name="bookmarkEdited">Lesezeichen hinzugefügt</string>
210+
<string name="bookmarkDeleteConfirmationMessage">&lt;b&gt;%1$s&lt;/b&gt; wurde gelöscht</string>
226211

227212
<!-- Dialogs -->
228213
<string name="dialogConfirmTitle">Bestätigen</string>
@@ -484,6 +469,11 @@
484469
<string name="fireproofWebsiteLoginDialogNegative">Jetzt nicht</string>
485470
<string name="fireproofWebsiteItemsSectionTitle">Websites</string>
486471
<string name="fireproofWebsiteToogleText">Beim Anmelden fragen</string>
472+
<string name="disableLoginDetectionDialogTitle">Erinnerung zur Feuerfest-Einstellung bei der Anmeldung auf Websites deaktivieren?</string>
473+
<string name="disableLoginDetectionDialogDescription">Diese Auswahl kann in den Einstellungen jederzeit rückgängig gemacht werden.</string>
474+
<string name="disableLoginDetectionDialogPositive">DEAKTIVIEREN</string>
475+
<string name="disableLoginDetectionDialogNegative">ABBRECHEN</string>
476+
<string name="fireproofWebsiteRemovalConfirmation">Feuerfest-Einstellung für &lt;b&gt;%1$s&lt;/b&gt; deaktiviert</string>
487477

488478
<!-- Fire Animation settings -->
489479
<string name="settingsFireAnimation">Animation der Schaltfläche „Feuer“</string>

app/src/main/res/values-el/strings.xml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,4 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<!--
3-
~ Copyright (c) 2020 DuckDuckGo
4-
~
5-
~ Licensed under the Apache License, Version 2.0 (the "License");
6-
~ you may not use this file except in compliance with the License.
7-
~ You may obtain a copy of the License at
8-
~
9-
~ http://www.apache.org/licenses/LICENSE-2.0
10-
~
11-
~ Unless required by applicable law or agreed to in writing, software
12-
~ distributed under the License is distributed on an "AS IS" BASIS,
13-
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
~ See the License for the specific language governing permissions and
15-
~ limitations under the License.
16-
-->
17-
182
<resources xmlns:tools="http://schemas.android.com/tools">
193

204
<string name="appName" translatable="false">DuckDuckGo</string>
@@ -223,6 +207,7 @@
223207
<string name="noBookmarks">Δεν προστέθηκαν σελιδοδείκτες ακόμα</string>
224208
<string name="bookmarkOverflowContentDescription">Περισσότερες επιλογές για σελιδοδείκτη %1$s</string>
225209
<string name="bookmarkEdited">Προστέθηκε σελιδοδείκτης</string>
210+
<string name="bookmarkDeleteConfirmationMessage">Διαγράφηκε &lt;b&gt;%1$s&lt;/b&gt;</string>
226211

227212
<!-- Dialogs -->
228213
<string name="dialogConfirmTitle">Επιβεβαίωση</string>
@@ -484,6 +469,11 @@
484469
<string name="fireproofWebsiteLoginDialogNegative">Όχι τώρα</string>
485470
<string name="fireproofWebsiteItemsSectionTitle">Ιστότοποι</string>
486471
<string name="fireproofWebsiteToogleText">Ερώτηση κατά τη σύνδεση</string>
472+
<string name="disableLoginDetectionDialogTitle">Απενεργοποίηση της υπενθύμισης Διαγραφής δραστηριότητας κατά τη σύνδεση σε ιστότοπους;</string>
473+
<string name="disableLoginDetectionDialogDescription">Μπορείτε να αλλάξετε την προτίμηση αυτή οποιαδήποτε στιγμή από τις Ρυθμίσεις.</string>
474+
<string name="disableLoginDetectionDialogPositive">ΑΠΕΝΕΡΓΟΠΟΙΗΣΗ</string>
475+
<string name="disableLoginDetectionDialogNegative">ΑΚΥΡΩΣΗ</string>
476+
<string name="fireproofWebsiteRemovalConfirmation">Η διαγραφή δραστηριότητας αφαιρέθηκε για το &lt;b&gt;%1$s&lt;/b&gt;</string>
487477

488478
<!-- Fire Animation settings -->
489479
<string name="settingsFireAnimation">Κινούμενο κουμπί φωτιάς</string>

app/src/main/res/values-es/strings.xml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,4 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<!--
3-
~ Copyright (c) 2020 DuckDuckGo
4-
~
5-
~ Licensed under the Apache License, Version 2.0 (the "License");
6-
~ you may not use this file except in compliance with the License.
7-
~ You may obtain a copy of the License at
8-
~
9-
~ http://www.apache.org/licenses/LICENSE-2.0
10-
~
11-
~ Unless required by applicable law or agreed to in writing, software
12-
~ distributed under the License is distributed on an "AS IS" BASIS,
13-
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
~ See the License for the specific language governing permissions and
15-
~ limitations under the License.
16-
-->
17-
182
<resources xmlns:tools="http://schemas.android.com/tools">
193

204
<string name="appName" translatable="false">DuckDuckGo</string>
@@ -223,6 +207,7 @@
223207
<string name="noBookmarks">Aún no se han añadido marcadores</string>
224208
<string name="bookmarkOverflowContentDescription">Más opciones para el marcador %1$s</string>
225209
<string name="bookmarkEdited">Marcador añadido</string>
210+
<string name="bookmarkDeleteConfirmationMessage">&lt;b&gt;%1$s&lt;/b&gt; eliminado</string>
226211

227212
<!-- Dialogs -->
228213
<string name="dialogConfirmTitle">Confirmar</string>
@@ -484,6 +469,11 @@
484469
<string name="fireproofWebsiteLoginDialogNegative">Ahora no</string>
485470
<string name="fireproofWebsiteItemsSectionTitle">Sitios web</string>
486471
<string name="fireproofWebsiteToogleText">Preguntar al iniciar sesión</string>
472+
<string name="disableLoginDetectionDialogTitle">¿Deshabilitar recordatorio de a prueba de fuego al iniciar sesión en los sitios?</string>
473+
<string name="disableLoginDetectionDialogDescription">Puedes cambiar esta preferencia en cualquier momento en Ajustes.</string>
474+
<string name="disableLoginDetectionDialogPositive">DESHABILITAR</string>
475+
<string name="disableLoginDetectionDialogNegative">CANCELAR</string>
476+
<string name="fireproofWebsiteRemovalConfirmation">A prueba de fuego desactivado para &lt;b&gt;%1$s&lt;/b&gt;</string>
487477

488478
<!-- Fire Animation settings -->
489479
<string name="settingsFireAnimation">Animación del botón Fuego</string>

0 commit comments

Comments
 (0)