From 1def4fd28427aafabf38a3d67f77da033d9d41b8 Mon Sep 17 00:00:00 2001 From: JohanLorenzo Date: Wed, 6 Sep 2023 15:32:25 +0000 Subject: [PATCH 1/4] Update Fenix initial_experiments.json based on the current first-run experiments in experimenter (cherry picked from commit 683843f83e9fdfd5ff00b32a175824ff19ae298b) --- app/src/main/res/raw/initial_experiments.json | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/app/src/main/res/raw/initial_experiments.json b/app/src/main/res/raw/initial_experiments.json index f624e7eba696..43ce01db1ede 100644 --- a/app/src/main/res/raw/initial_experiments.json +++ b/app/src/main/res/raw/initial_experiments.json @@ -131,6 +131,67 @@ "localizations": null, "locales": null }, + { + "schemaVersion": "1.12.0", + "slug": "beta-android-onboarding-redesign-treatment-a-rollout", + "id": "beta-android-onboarding-redesign-treatment-a-rollout", + "arguments": {}, + "application": "org.mozilla.firefox_beta", + "appName": "fenix", + "appId": "org.mozilla.firefox_beta", + "channel": "beta", + "userFacingName": "Beta Android Onboarding Redesign - Treatment A Rollout", + "userFacingDescription": "Testing a new onboarding experience.", + "isEnrollmentPaused": false, + "isRollout": true, + "bucketConfig": { + "randomizationUnit": "nimbus_id", + "namespace": "fenix-juno-onboarding-beta-mobile_first_run-rollout-1", + "start": 0, + "count": 10000, + "total": 10000 + }, + "featureIds": [ + "juno-onboarding" + ], + "probeSets": [], + "outcomes": [ + { + "slug": "default-browser", + "priority": "primary" + } + ], + "branches": [ + { + "slug": "treatment-a", + "ratio": 1, + "feature": { + "featureId": "this-is-included-for-mobile-pre-96-support", + "enabled": false, + "value": {} + }, + "features": [ + { + "featureId": "juno-onboarding", + "enabled": true, + "value": { + "enabled": true + } + } + ] + } + ], + "targeting": "((is_already_enrolled) || ((isFirstRun == 'true') && (app_version|versionCompare('118.!') >= 0)))", + "startDate": "2023-09-06", + "enrollmentEndDate": "2023-09-11", + "endDate": null, + "proposedDuration": 28, + "proposedEnrollment": 7, + "referenceBranch": "treatment-a", + "featureValidationOptOut": false, + "localizations": null, + "locales": null + }, { "schemaVersion": "1.12.0", "slug": "felt-privacy-android", From fb102ec85b85ef1f12b9fd0fcda410479583d7d3 Mon Sep 17 00:00:00 2001 From: Oana Horvath Date: Thu, 7 Sep 2023 16:28:34 +0300 Subject: [PATCH 2/4] Bug 1815395 - Disable failing audio-video permissions UI tests (#3512) Co-authored-by: oana.horvath Co-authored-by: Donal Meehan <76789979+DonalMe@users.noreply.github.com> (cherry picked from commit ae499cf0460417234415cda1344fecb30b9f842b) --- .../org/mozilla/fenix/ui/SettingsSitePermissionsTest.kt | 1 + .../java/org/mozilla/fenix/ui/SitePermissionsTest.kt | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/SettingsSitePermissionsTest.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/SettingsSitePermissionsTest.kt index 4748eae1b1c8..d73d92b6dfed 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/SettingsSitePermissionsTest.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/SettingsSitePermissionsTest.kt @@ -416,6 +416,7 @@ class SettingsSitePermissionsTest { } } + @Ignore("Flaky, see: https://bugzilla.mozilla.org/show_bug.cgi?id=1829889") @Test fun verifyDRMControlledContentPermissionSettingsTest() { navigationToolbar { diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/SitePermissionsTest.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/SitePermissionsTest.kt index a5bd7fec5b60..3ec51ffb9c6b 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/SitePermissionsTest.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/SitePermissionsTest.kt @@ -15,6 +15,7 @@ import okhttp3.mockwebserver.MockWebServer import org.junit.After import org.junit.Assume.assumeTrue import org.junit.Before +import org.junit.Ignore import org.junit.Rule import org.junit.Test import org.mozilla.fenix.customannotations.SmokeTest @@ -95,6 +96,7 @@ class SitePermissionsTest { } } + @Ignore("Failing, see: https://bugzilla.mozilla.org/show_bug.cgi?id=1815395") @SmokeTest @Test fun rememberBlockAudioVideoPermissionChoiceTest() { @@ -118,6 +120,7 @@ class SitePermissionsTest { } } + @Ignore("Failing, see: https://bugzilla.mozilla.org/show_bug.cgi?id=1815395") @SmokeTest @Test fun rememberAllowAudioVideoPermissionChoiceTest() { @@ -158,6 +161,7 @@ class SitePermissionsTest { } } + @Ignore("Failing, see: https://bugzilla.mozilla.org/show_bug.cgi?id=1815395") @Test fun rememberBlockMicrophonePermissionChoiceTest() { assumeTrue(micManager.microphones.isNotEmpty()) @@ -179,6 +183,7 @@ class SitePermissionsTest { } } + @Ignore("Failing, see: https://bugzilla.mozilla.org/show_bug.cgi?id=1815395") @Test fun rememberAllowMicrophonePermissionChoiceTest() { assumeTrue(micManager.microphones.isNotEmpty()) @@ -217,6 +222,7 @@ class SitePermissionsTest { } } + @Ignore("Failing, see: https://bugzilla.mozilla.org/show_bug.cgi?id=1815395") @Test fun rememberBlockCameraPermissionChoiceTest() { assumeTrue(cameraManager.cameraIdList.isNotEmpty()) @@ -238,6 +244,7 @@ class SitePermissionsTest { } } + @Ignore("Failing, see: https://bugzilla.mozilla.org/show_bug.cgi?id=1815395") @Test fun rememberAllowCameraPermissionChoiceTest() { assumeTrue(cameraManager.cameraIdList.isNotEmpty()) From cdb46616dc9e1ed7e7a83b9581a996a0f52792ab Mon Sep 17 00:00:00 2001 From: JohanLorenzo Date: Thu, 7 Sep 2023 15:33:11 +0000 Subject: [PATCH 3/4] Update Fenix initial_experiments.json based on the current first-run experiments in experimenter (cherry picked from commit 4e73d7d8ee606ae7b9ea5bd5ce542fa2fc939863) --- app/src/main/res/raw/initial_experiments.json | 114 ------------------ 1 file changed, 114 deletions(-) diff --git a/app/src/main/res/raw/initial_experiments.json b/app/src/main/res/raw/initial_experiments.json index 43ce01db1ede..4701aa7b322a 100644 --- a/app/src/main/res/raw/initial_experiments.json +++ b/app/src/main/res/raw/initial_experiments.json @@ -403,120 +403,6 @@ "featureValidationOptOut": false, "localizations": null, "locales": null - }, - { - "schemaVersion": "1.12.0", - "slug": "splash-screen-max-duration-test", - "id": "splash-screen-max-duration-test", - "arguments": {}, - "application": "org.mozilla.firefox", - "appName": "fenix", - "appId": "org.mozilla.firefox", - "channel": "release", - "userFacingName": "Splash screen max duration test", - "userFacingDescription": "Testing a splashscreen on app launch.", - "isEnrollmentPaused": true, - "isRollout": false, - "bucketConfig": { - "randomizationUnit": "nimbus_id", - "namespace": "fenix-splash-screen-release-1", - "start": 0, - "count": 10000, - "total": 10000 - }, - "featureIds": [ - "splash-screen" - ], - "probeSets": [], - "outcomes": [], - "branches": [ - { - "slug": "control", - "ratio": 1, - "feature": { - "featureId": "this-is-included-for-mobile-pre-96-support", - "enabled": false, - "value": {} - }, - "features": [ - { - "featureId": "splash-screen", - "enabled": true, - "value": { - "enabled": false, - "maximum_duration_ms": 0 - } - } - ] - }, - { - "slug": "treatment-a", - "ratio": 1, - "feature": { - "featureId": "this-is-included-for-mobile-pre-96-support", - "enabled": false, - "value": {} - }, - "features": [ - { - "featureId": "splash-screen", - "enabled": true, - "value": { - "enabled": true, - "maximum_duration_ms": 2500 - } - } - ] - }, - { - "slug": "treatment-b", - "ratio": 1, - "feature": { - "featureId": "this-is-included-for-mobile-pre-96-support", - "enabled": false, - "value": {} - }, - "features": [ - { - "featureId": "splash-screen", - "enabled": true, - "value": { - "enabled": true, - "maximum_duration_ms": 6000 - } - } - ] - }, - { - "slug": "treatment-c", - "ratio": 1, - "feature": { - "featureId": "this-is-included-for-mobile-pre-96-support", - "enabled": false, - "value": {} - }, - "features": [ - { - "featureId": "splash-screen", - "enabled": true, - "value": { - "enabled": true, - "maximum_duration_ms": 11000 - } - } - ] - } - ], - "targeting": "((is_already_enrolled) || ((isFirstRun == 'true') && (app_version|versionCompare('116.!') >= 0) && (region in ['AD', 'AE', 'AF', 'AG', 'AI', 'AL', 'AM', 'AO', 'AQ', 'AR', 'AS', 'AT', 'AU', 'AW', 'AX', 'AZ', 'BA', 'BB', 'BD', 'BE', 'BF', 'BG', 'BH', 'BI', 'BJ', 'BL', 'BM', 'BN', 'BO', 'BQ', 'BR', 'BS', 'BT', 'BV', 'BW', 'BY', 'BZ', 'CA', 'CC', 'CD', 'CF', 'CG', 'CH', 'CI', 'CK', 'CL', 'CM', 'CN', 'CO', 'CR', 'CU', 'CV', 'CW', 'CX', 'CY', 'CZ', 'DJ', 'DK', 'DM', 'DO', 'DZ', 'EC', 'EE', 'EG', 'EH', 'ER', 'ES', 'ET', 'FI', 'FJ', 'FK', 'FM', 'FO', 'FR', 'GA', 'GB', 'GD', 'GE', 'GF', 'GG', 'GH', 'GI', 'GL', 'GM', 'GN', 'GP', 'GQ', 'GR', 'GS', 'GT', 'GU', 'GW', 'GY', 'HK', 'HM', 'HN', 'HR', 'HT', 'HU', 'ID', 'IE', 'IL', 'IM', 'IN', 'IO', 'IQ', 'IR', 'IS', 'IT', 'JE', 'JM', 'JO', 'JP', 'KE', 'KG', 'KH', 'KI', 'KM', 'KN', 'KP', 'KR', 'KW', 'KY', 'KZ', 'LA', 'LB', 'LC', 'LI', 'LK', 'LR', 'LS', 'LT', 'LU', 'LV', 'LY', 'MA', 'MC', 'MD', 'ME', 'MF', 'MG', 'MH', 'MK', 'ML', 'MM', 'MN', 'MO', 'MP', 'MQ', 'MR', 'MS', 'MT', 'MU', 'MV', 'MW', 'MX', 'MY', 'MZ', 'NA', 'NC', 'NE', 'NF', 'NG', 'NI', 'NL', 'NO', 'NP', 'NR', 'NU', 'NZ', 'OM', 'PA', 'PE', 'PF', 'PG', 'PH', 'PK', 'PL', 'PM', 'PN', 'PR', 'PS', 'PT', 'PW', 'PY', 'QA', 'RE', 'RO', 'RS', 'RU', 'RW', 'SA', 'SB', 'SC', 'SD', 'SE', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', 'SN', 'SO', 'SR', 'SS', 'ST', 'SV', 'SX', 'SY', 'SZ', 'TC', 'TD', 'TF', 'TG', 'TH', 'TJ', 'TK', 'TL', 'TM', 'TN', 'TO', 'TR', 'TT', 'TV', 'TW', 'TZ', 'UA', 'UG', 'UM', 'US', 'UY', 'UZ', 'VA', 'VC', 'VE', 'VG', 'VI', 'VN', 'VU', 'WF', 'WS', 'YE', 'YT', 'ZA', 'ZM', 'ZW'])))", - "startDate": "2023-07-24", - "enrollmentEndDate": "2023-08-09", - "endDate": null, - "proposedDuration": 42, - "proposedEnrollment": 14, - "referenceBranch": "control", - "featureValidationOptOut": false, - "localizations": null, - "locales": null } ] } From 8f29882f604d059d55b30544306c27a0483759ae Mon Sep 17 00:00:00 2001 From: Gabriel Luong Date: Wed, 6 Sep 2023 22:04:51 -0400 Subject: [PATCH 4/4] Bug 1851678 - Catch AutofillApiException exception when fetching autofill data and setting startup metrics (cherry picked from commit 6449e3ca8fef0b87de285d28889d3694b3df24a6) --- .../main/java/org/mozilla/fenix/FenixApplication.kt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/mozilla/fenix/FenixApplication.kt b/app/src/main/java/org/mozilla/fenix/FenixApplication.kt index 561758c40dec..cfe33e9ac327 100644 --- a/app/src/main/java/org/mozilla/fenix/FenixApplication.kt +++ b/app/src/main/java/org/mozilla/fenix/FenixApplication.kt @@ -28,6 +28,7 @@ import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.async import kotlinx.coroutines.launch import mozilla.appservices.Megazord +import mozilla.appservices.autofill.AutofillApiException import mozilla.components.browser.state.action.SystemAction import mozilla.components.browser.state.selector.selectedTab import mozilla.components.browser.state.state.searchEngines @@ -837,9 +838,13 @@ open class FenixApplication : LocaleAwareApplication(), Provider { @OptIn(DelicateCoroutinesApi::class) GlobalScope.launch(IO) { - val autoFillStorage = applicationContext.components.core.autofillStorage - Addresses.savedAll.set(autoFillStorage.getAllAddresses().size.toLong()) - CreditCards.savedAll.set(autoFillStorage.getAllCreditCards().size.toLong()) + try { + val autoFillStorage = applicationContext.components.core.autofillStorage + Addresses.savedAll.set(autoFillStorage.getAllAddresses().size.toLong()) + CreditCards.savedAll.set(autoFillStorage.getAllCreditCards().size.toLong()) + } catch (e: AutofillApiException) { + logger.error("Failed to fetch autofill data", e) + } try { val passwordsStorage = applicationContext.components.core.passwordsStorage