From 7603a880a3a15c4383555db0d61d0aa2e311ceff Mon Sep 17 00:00:00 2001 From: Jan-Erik Rediger Date: Thu, 4 Mar 2021 17:22:56 +0100 Subject: [PATCH] Pass auto-generated build info (version code and name) to Glean (#18230) This also re-generated the Glean docs due to an update of the bundled glean-parser. --- .../java/org/mozilla/fenix/glean/BaselinePingTest.kt | 8 +++++--- app/src/main/java/org/mozilla/fenix/FenixApplication.kt | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/src/androidTest/java/org/mozilla/fenix/glean/BaselinePingTest.kt b/app/src/androidTest/java/org/mozilla/fenix/glean/BaselinePingTest.kt index c3a26ae21432..fe941a86eda1 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/glean/BaselinePingTest.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/glean/BaselinePingTest.kt @@ -27,6 +27,7 @@ import org.junit.BeforeClass import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith +import org.mozilla.fenix.GleanMetrics.GleanBuildInfo import org.mozilla.fenix.HomeActivity import org.mozilla.fenix.R import org.mozilla.fenix.helpers.HomeActivityTestRule @@ -85,9 +86,10 @@ class BaselinePingTest { // we need to do this on the main thread, as the Glean SDK requires it. GlobalScope.launch(Dispatchers.Main.immediate) { Glean.initialize( - ApplicationProvider.getApplicationContext(), - true, - Configuration(httpClient = httpClient) + applicationContext = ApplicationProvider.getApplicationContext(), + uploadEnabled = true, + configuration = Configuration(httpClient = httpClient), + buildInfo = GleanBuildInfo.buildInfo ) } } diff --git a/app/src/main/java/org/mozilla/fenix/FenixApplication.kt b/app/src/main/java/org/mozilla/fenix/FenixApplication.kt index f7440d78170f..2ec0a0184f97 100644 --- a/app/src/main/java/org/mozilla/fenix/FenixApplication.kt +++ b/app/src/main/java/org/mozilla/fenix/FenixApplication.kt @@ -38,6 +38,7 @@ import mozilla.components.support.rusthttp.RustHttpConfig import mozilla.components.support.rustlog.RustLog import mozilla.components.support.utils.logElapsedTime import mozilla.components.support.webextensions.WebExtensionSupport +import org.mozilla.fenix.GleanMetrics.GleanBuildInfo import org.mozilla.fenix.GleanMetrics.PerfStartup import org.mozilla.fenix.components.Components import org.mozilla.fenix.components.metrics.MetricServiceType @@ -112,7 +113,8 @@ open class FenixApplication : LocaleAwareApplication(), Provider { httpClient = ConceptFetchHttpUploader( lazy(LazyThreadSafetyMode.NONE) { components.core.client } )), - uploadEnabled = telemetryEnabled + uploadEnabled = telemetryEnabled, + buildInfo = GleanBuildInfo.buildInfo ) } Gexsi end */