diff --git a/app/metrics.yaml b/app/metrics.yaml index b45bd2c92f..9ec0ab7cec 100644 --- a/app/metrics.yaml +++ b/app/metrics.yaml @@ -2266,26 +2266,6 @@ metrics: metadata: tags: - Notifications - shared_prefs_uuid: - type: uuid - lifetime: ping - description: | - A UUID stored in Shared Preferences used to analyze technical differences - between storage mechanisms in Android, specifically the Glean DB and - Shared Preferences. - send_in_pings: - - metrics - notification_emails: - - android-probes@mozilla.com - - raphael@mozilla.com - - fbertsch@mozilla.com - bugs: - - https://bugzilla.mozilla.org/show_bug.cgi?id=1822119 - data_reviews: - - https://bugzilla.mozilla.org/show_bug.cgi?id=1822119 - data_sensitivity: - - technical - expires: 116 customize_home: most_visited_sites: @@ -9473,23 +9453,6 @@ private_browsing_shortcut_cfr: - android-probes@mozilla.com expires: 122 -server_knobs: - validation: - disabled: true - type: event - description: | - Temporary metric recorded at the same time as - "tabs_tray.new_tab_tapped" to validate that the Glean Server Knobs - functionality is working correctly. - bugs: - - https://bugzilla.mozilla.org/show_bug.cgi?id=1823682 - data_reviews: - - https://bugzilla.mozilla.org/show_bug.cgi?id=1823682#c2 - notification_emails: - - android-probes@mozilla.com - - brosa@mozilla.com - expires: 116 - pull_to_refresh_in_browser: enabled: type: boolean diff --git a/app/src/main/java/org/mozilla/fenix/FenixApplication.kt b/app/src/main/java/org/mozilla/fenix/FenixApplication.kt index bf03178d3a..518e0557ed 100644 --- a/app/src/main/java/org/mozilla/fenix/FenixApplication.kt +++ b/app/src/main/java/org/mozilla/fenix/FenixApplication.kt @@ -719,12 +719,6 @@ open class FenixApplication : LocaleAwareApplication(), Provider { searchWidgetInstalled.set(settings.searchWidgetInstalled) - if (settings.sharedPrefsUUID.isEmpty()) { - settings.sharedPrefsUUID = sharedPrefsUuid.generateAndSet().toString() - } else { - sharedPrefsUuid.set(UUID.fromString(settings.sharedPrefsUUID)) - } - val openTabsCount = settings.openTabsCount hasOpenTabs.set(openTabsCount > 0) if (openTabsCount > 0) { diff --git a/app/src/main/java/org/mozilla/fenix/settings/DataChoicesFragment.kt b/app/src/main/java/org/mozilla/fenix/settings/DataChoicesFragment.kt index a89feaac9b..158201ce33 100644 --- a/app/src/main/java/org/mozilla/fenix/settings/DataChoicesFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/settings/DataChoicesFragment.kt @@ -33,11 +33,6 @@ class DataChoicesFragment : PreferenceFragmentCompat() { context.components.analytics.metrics.start(MetricServiceType.Data) } else { context.components.analytics.metrics.stop(MetricServiceType.Data) - - // Reset the Shared Prefs UUID on opt-out since we're investigating cases of - // unexpected client ID regeneration. Telemetry data collection opt-out is - // expected to reset the client ID. - context.settings().sharedPrefsUUID = "" } // Reset experiment identifiers on both opt-in and opt-out; it's likely // that in future we will need to pass in the new telemetry client_id diff --git a/app/src/main/java/org/mozilla/fenix/tabstray/TabsTrayController.kt b/app/src/main/java/org/mozilla/fenix/tabstray/TabsTrayController.kt index 6f53c9e9ce..2fb69d5acd 100644 --- a/app/src/main/java/org/mozilla/fenix/tabstray/TabsTrayController.kt +++ b/app/src/main/java/org/mozilla/fenix/tabstray/TabsTrayController.kt @@ -28,7 +28,6 @@ import mozilla.telemetry.glean.private.NoExtras import org.mozilla.fenix.BrowserDirection import org.mozilla.fenix.GleanMetrics.Collections import org.mozilla.fenix.GleanMetrics.Events -import org.mozilla.fenix.GleanMetrics.ServerKnobs import org.mozilla.fenix.GleanMetrics.TabsTray import org.mozilla.fenix.HomeActivity import org.mozilla.fenix.R @@ -476,9 +475,6 @@ class DefaultTabsTrayController( TabsTray.newPrivateTabTapped.record(NoExtras()) } else { TabsTray.newTabTapped.record(NoExtras()) - - // Temporary recording for validating the Glean Server Knobs functionality. - ServerKnobs.validation.record(NoExtras()) } } diff --git a/app/src/main/java/org/mozilla/fenix/utils/Settings.kt b/app/src/main/java/org/mozilla/fenix/utils/Settings.kt index 58a3e07a25..63a22bf5ca 100644 --- a/app/src/main/java/org/mozilla/fenix/utils/Settings.kt +++ b/app/src/main/java/org/mozilla/fenix/utils/Settings.kt @@ -220,16 +220,6 @@ class Settings(private val appContext: Context) : PreferencesHolder { default = "", ) - /** - * A UUID stored in Shared Preferences used to analyze technical differences - * between storage mechanisms in Android, specifically the Glean DB and - * Shared Preferences. - */ - var sharedPrefsUUID by stringPreference( - appContext.getPreferenceKey(R.string.pref_key_shared_prefs_uuid), - default = "", - ) - var currentWallpaperName by stringPreference( appContext.getPreferenceKey(R.string.pref_key_current_wallpaper), default = Wallpaper.Default.name, diff --git a/app/src/main/res/values/preference_keys.xml b/app/src/main/res/values/preference_keys.xml index a3e07a1055..2293b48967 100644 --- a/app/src/main/res/values/preference_keys.xml +++ b/app/src/main/res/values/preference_keys.xml @@ -342,7 +342,6 @@ pref_key_custom_sponsored_stories_site_id pref_key_custom_sponsored_stories_country pref_key_custom_sponsored_stories_city - pref_key_shared_prefs_uuid pref_key_enable_compose_top_sites diff --git a/app/src/test/java/org/mozilla/fenix/FenixApplicationTest.kt b/app/src/test/java/org/mozilla/fenix/FenixApplicationTest.kt index 73f8c71d6f..4069d7a659 100644 --- a/app/src/test/java/org/mozilla/fenix/FenixApplicationTest.kt +++ b/app/src/test/java/org/mozilla/fenix/FenixApplicationTest.kt @@ -148,9 +148,6 @@ class FenixApplicationTest { assertTrue(settings.contileContextId.isEmpty()) assertNull(TopSites.contextId.testGetValue()) - assertTrue(settings.sharedPrefsUUID.isEmpty()) - assertNull(Metrics.sharedPrefsUuid.testGetValue()) - application.setStartupMetrics(browserStore, settings, browsersCache, mozillaProductDetector) // Verify that browser defaults metrics are set. @@ -195,14 +192,6 @@ class FenixApplicationTest { assertNotNull(TopSites.contextId.testGetValue()) assertEquals(contextId, settings.contileContextId) - // Verify that setStartupMetrics() creates `the Metrics.sharedPrefsUuid` - // Glean metric and that it stores the value in shared preferences at - // settings.sharedPrefsUUID. Subsequent calls load the UUID value from - // shared preferences rather than generating a new one. - val sharedPrefsUUIDMetricValue = Metrics.sharedPrefsUuid.testGetValue()!!.toString() - assertNotNull(Metrics.sharedPrefsUuid.testGetValue()) - assertEquals(sharedPrefsUUIDMetricValue, settings.sharedPrefsUUID) - // Verify that search engine defaults are NOT set. This test does // not mock most of the objects telemetry is collected from. assertNull(SearchDefaultEngine.code.testGetValue()) @@ -213,9 +202,6 @@ class FenixApplicationTest { assertEquals(contextId, TopSites.contextId.testGetValue()!!.toString()) assertEquals(contextId, settings.contileContextId) - - assertEquals(sharedPrefsUUIDMetricValue, Metrics.sharedPrefsUuid.testGetValue()!!.toString()) - assertEquals(sharedPrefsUUIDMetricValue, settings.sharedPrefsUUID) } @Test