Bug 1887023 - Remove service-glean API wrappers from android-components. r=janerik,android-reviewers,gl
Differential Revision: https://phabricator.services.mozilla.com/D217479
This commit is contained in:
@@ -91,8 +91,8 @@ dependencies {
|
|||||||
|
|
||||||
// We only compile against Glean. It's up to the app to add those dependencies
|
// We only compile against Glean. It's up to the app to add those dependencies
|
||||||
// if it wants to collect GeckoView telemetry through the Glean SDK.
|
// if it wants to collect GeckoView telemetry through the Glean SDK.
|
||||||
compileOnly project(":service-glean")
|
compileOnly ComponentsDependencies.mozilla_glean
|
||||||
testImplementation project(":service-glean")
|
testImplementation ComponentsDependencies.mozilla_glean
|
||||||
testImplementation ComponentsDependencies.androidx_work_testing
|
testImplementation ComponentsDependencies.androidx_work_testing
|
||||||
|
|
||||||
androidTestImplementation ComponentsDependencies.androidx_test_core
|
androidTestImplementation ComponentsDependencies.androidx_test_core
|
||||||
@@ -101,6 +101,7 @@ dependencies {
|
|||||||
androidTestImplementation project(':tooling-fetch-tests')
|
androidTestImplementation project(':tooling-fetch-tests')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ext.gleanNamespace = "mozilla.telemetry.glean"
|
||||||
apply plugin: "org.mozilla.telemetry.glean-gradle-plugin"
|
apply plugin: "org.mozilla.telemetry.glean-gradle-plugin"
|
||||||
apply from: '../../../android-lint.gradle'
|
apply from: '../../../android-lint.gradle'
|
||||||
apply from: '../../../publish.gradle'
|
apply from: '../../../publish.gradle'
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ dependencies {
|
|||||||
api (ComponentsDependencies.mozilla_appservices_places) {
|
api (ComponentsDependencies.mozilla_appservices_places) {
|
||||||
// Use our own version of the Glean dependency,
|
// Use our own version of the Glean dependency,
|
||||||
// which might be different from the version declared by A-S.
|
// which might be different from the version declared by A-S.
|
||||||
exclude group: 'org.mozilla.components', module: 'service-glean'
|
exclude group: 'org.mozilla.telemetry', module: 'glean'
|
||||||
}
|
}
|
||||||
|
|
||||||
api ComponentsDependencies.mozilla_appservices_tabs
|
api ComponentsDependencies.mozilla_appservices_tabs
|
||||||
|
|||||||
@@ -81,8 +81,8 @@ dependencies {
|
|||||||
|
|
||||||
// We only compile against GeckoView and Glean. It's up to the app to add those dependencies if it wants to
|
// We only compile against GeckoView and Glean. It's up to the app to add those dependencies if it wants to
|
||||||
// send crash reports to Socorro (GV).
|
// send crash reports to Socorro (GV).
|
||||||
compileOnly project(":service-glean")
|
compileOnly ComponentsDependencies.mozilla_glean
|
||||||
testImplementation project(":service-glean")
|
testImplementation ComponentsDependencies.mozilla_glean
|
||||||
testImplementation ComponentsDependencies.androidx_work_testing
|
testImplementation ComponentsDependencies.androidx_work_testing
|
||||||
|
|
||||||
testImplementation project(':support-test')
|
testImplementation project(':support-test')
|
||||||
@@ -94,6 +94,7 @@ dependencies {
|
|||||||
testImplementation ComponentsDependencies.mozilla_glean_forUnitTests
|
testImplementation ComponentsDependencies.mozilla_glean_forUnitTests
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ext.gleanNamespace = "mozilla.telemetry.glean"
|
||||||
apply plugin: "org.mozilla.telemetry.glean-gradle-plugin"
|
apply plugin: "org.mozilla.telemetry.glean-gradle-plugin"
|
||||||
apply from: '../../../android-lint.gradle'
|
apply from: '../../../android-lint.gradle'
|
||||||
apply from: '../../../publish.gradle'
|
apply from: '../../../publish.gradle'
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import mozilla.components.lib.crash.GleanMetrics.Crash as GleanCrash
|
|||||||
* A [CrashReporterService] implementation for recording metrics with Glean. The purpose of this
|
* A [CrashReporterService] implementation for recording metrics with Glean. The purpose of this
|
||||||
* crash reporter is to collect crash count metrics by capturing [Crash.UncaughtExceptionCrash],
|
* crash reporter is to collect crash count metrics by capturing [Crash.UncaughtExceptionCrash],
|
||||||
* [Throwable] and [Crash.NativeCodeCrash] events and record to the respective
|
* [Throwable] and [Crash.NativeCodeCrash] events and record to the respective
|
||||||
* [mozilla.components.service.glean.private.CounterMetricType].
|
* [mozilla.telemetry.glean.private.CounterMetricType].
|
||||||
*/
|
*/
|
||||||
class GleanCrashReporterService(
|
class GleanCrashReporterService(
|
||||||
val context: Context,
|
val context: Context,
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import androidx.test.core.app.ApplicationProvider
|
|||||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||||
import mozilla.components.lib.crash.Crash
|
import mozilla.components.lib.crash.Crash
|
||||||
import mozilla.components.lib.crash.GleanMetrics.CrashMetrics
|
import mozilla.components.lib.crash.GleanMetrics.CrashMetrics
|
||||||
import mozilla.components.service.glean.testing.GleanTestRule
|
|
||||||
import mozilla.components.support.test.whenever
|
import mozilla.components.support.test.whenever
|
||||||
|
import mozilla.telemetry.glean.testing.GleanTestRule
|
||||||
import org.junit.Assert.assertEquals
|
import org.junit.Assert.assertEquals
|
||||||
import org.junit.Assert.assertFalse
|
import org.junit.Assert.assertFalse
|
||||||
import org.junit.Assert.assertTrue
|
import org.junit.Assert.assertTrue
|
||||||
|
|||||||
@@ -1,145 +0,0 @@
|
|||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
package mozilla.components.service.glean
|
|
||||||
|
|
||||||
import android.content.Context
|
|
||||||
import androidx.annotation.MainThread
|
|
||||||
import androidx.annotation.VisibleForTesting
|
|
||||||
import mozilla.components.service.glean.config.Configuration
|
|
||||||
import mozilla.components.service.glean.private.RecordedExperiment
|
|
||||||
import org.json.JSONObject
|
|
||||||
import mozilla.telemetry.glean.Glean as GleanCore
|
|
||||||
|
|
||||||
typealias BuildInfo = mozilla.telemetry.glean.BuildInfo
|
|
||||||
|
|
||||||
/**
|
|
||||||
* In contrast with other glean-ac classes (i.e. Configuration), we can't
|
|
||||||
* use typealias to export mozilla.telemetry.glean.Glean, as we need to provide
|
|
||||||
* a different default [Configuration]. Moreover, we can't simply delegate other
|
|
||||||
* methods or inherit, since that doesn't work for `object` in Kotlin.
|
|
||||||
*/
|
|
||||||
object Glean {
|
|
||||||
/**
|
|
||||||
* Initialize Glean.
|
|
||||||
*
|
|
||||||
* This should only be initialized once by the application, and not by
|
|
||||||
* libraries using Glean. A message is logged to error and no changes are made
|
|
||||||
* to the state if initialize is called a more than once.
|
|
||||||
*
|
|
||||||
* A LifecycleObserver will be added to send pings when the application goes
|
|
||||||
* into the background.
|
|
||||||
*
|
|
||||||
* @param applicationContext [Context] to access application features, such
|
|
||||||
* as shared preferences
|
|
||||||
* @param uploadEnabled A [Boolean] that determines the initial state of the uploader
|
|
||||||
* @param configuration A Glean [Configuration] object with global settings.
|
|
||||||
* @param buildInfo A Glean [BuildInfo] object with build-time metadata. This
|
|
||||||
* object is generated at build time by glean_parser at the import path
|
|
||||||
* ${YOUR_PACKAGE_ROOT}.GleanMetrics.GleanBuildInfo.buildInfo
|
|
||||||
*/
|
|
||||||
@MainThread
|
|
||||||
fun initialize(
|
|
||||||
applicationContext: Context,
|
|
||||||
uploadEnabled: Boolean,
|
|
||||||
configuration: Configuration,
|
|
||||||
buildInfo: BuildInfo,
|
|
||||||
) {
|
|
||||||
GleanCore.initialize(
|
|
||||||
applicationContext = applicationContext,
|
|
||||||
uploadEnabled = uploadEnabled,
|
|
||||||
configuration = configuration.toWrappedConfiguration(),
|
|
||||||
buildInfo = buildInfo,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Register the pings generated from `pings.yaml` with Glean.
|
|
||||||
*
|
|
||||||
* @param pings The `Pings` object generated for your library or application
|
|
||||||
* by Glean.
|
|
||||||
*/
|
|
||||||
fun registerPings(pings: Any) {
|
|
||||||
GleanCore.registerPings(pings)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Enable or disable Glean collection and upload.
|
|
||||||
*
|
|
||||||
* Metric collection is enabled by default.
|
|
||||||
*
|
|
||||||
* When disabled, metrics aren't recorded at all and no data
|
|
||||||
* is uploaded.
|
|
||||||
*
|
|
||||||
* @param enabled When true, enable metric collection.
|
|
||||||
*/
|
|
||||||
fun setUploadEnabled(enabled: Boolean) {
|
|
||||||
GleanCore.setUploadEnabled(enabled)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Indicate that an experiment is running. Glean will then add an
|
|
||||||
* experiment annotation to the environment which is sent with pings. This
|
|
||||||
* information is not persisted between runs.
|
|
||||||
*
|
|
||||||
* @param experimentId The id of the active experiment (maximum
|
|
||||||
* 30 bytes)
|
|
||||||
* @param branch The experiment branch (maximum 30 bytes)
|
|
||||||
* @param extra Optional metadata to output with the ping
|
|
||||||
*/
|
|
||||||
@JvmOverloads
|
|
||||||
fun setExperimentActive(
|
|
||||||
experimentId: String,
|
|
||||||
branch: String,
|
|
||||||
extra: Map<String, String>? = null,
|
|
||||||
) {
|
|
||||||
GleanCore.setExperimentActive(
|
|
||||||
experimentId = experimentId,
|
|
||||||
branch = branch,
|
|
||||||
extra = extra,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Indicate that an experiment is no longer running.
|
|
||||||
*
|
|
||||||
* @param experimentId The id of the experiment to deactivate.
|
|
||||||
*/
|
|
||||||
fun setExperimentInactive(experimentId: String) {
|
|
||||||
GleanCore.setExperimentInactive(experimentId = experimentId)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set configuration to override metrics' enabled state, typically from a remote_settings
|
|
||||||
* experiment or rollout.
|
|
||||||
*
|
|
||||||
* @param enabled Map of metrics' enabled state.
|
|
||||||
*/
|
|
||||||
fun applyServerKnobsConfig(enabled: Map<String, Boolean>) {
|
|
||||||
GleanCore.applyServerKnobsConfig(JSONObject(enabled).toString())
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Tests whether an experiment is active, for testing purposes only.
|
|
||||||
*
|
|
||||||
* @param experimentId the id of the experiment to look for.
|
|
||||||
* @return true if the experiment is active and reported in pings, otherwise false
|
|
||||||
*/
|
|
||||||
@VisibleForTesting(otherwise = VisibleForTesting.NONE)
|
|
||||||
fun testIsExperimentActive(experimentId: String): Boolean {
|
|
||||||
return GleanCore.testIsExperimentActive(experimentId)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the stored data for the requested active experiment, for testing purposes only.
|
|
||||||
*
|
|
||||||
* @param experimentId the id of the experiment to look for.
|
|
||||||
* @return the [RecordedExperiment] for the experiment
|
|
||||||
* @throws [NullPointerException] if the requested experiment is not active or data is corrupt.
|
|
||||||
*/
|
|
||||||
@VisibleForTesting(otherwise = VisibleForTesting.NONE)
|
|
||||||
fun testGetExperimentData(experimentId: String): RecordedExperiment {
|
|
||||||
return GleanCore.testGetExperimentData(experimentId)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
package mozilla.components.service.glean.config
|
|
||||||
|
|
||||||
import mozilla.telemetry.glean.net.PingUploader
|
|
||||||
import mozilla.telemetry.glean.config.Configuration as GleanCoreConfiguration
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The Configuration class describes how to configure the Glean.
|
|
||||||
*
|
|
||||||
* @property httpClient The HTTP client implementation to use for uploading pings.
|
|
||||||
* If you don't provide your own networking stack with an HTTP client to use,
|
|
||||||
* you can fall back to a simple implementation on top of `java.net` using
|
|
||||||
* `ConceptFetchHttpUploader(lazy { HttpURLConnectionClient() as Client })`
|
|
||||||
* @property serverEndpoint (optional) the server pings are sent to. Please note that this is
|
|
||||||
* is only meant to be changed for tests.
|
|
||||||
* @property channel (optional )the release channel the application is on, if known. This will be
|
|
||||||
* sent along with all the pings, in the `client_info` section.
|
|
||||||
* @property maxEvents (optional) the number of events to store before the events ping is sent
|
|
||||||
* @property enableEventTimestamps Whether to add a wallclock timestamp to all events.
|
|
||||||
* @property experimentationId An experimentation identifier derived by the application
|
|
||||||
* to be sent with all pings.
|
|
||||||
* @property enableInternalPings Whether to enable internal pings.
|
|
||||||
* @property delayPingLifetimeIo Whether Glean should delay persistence of data from metrics with ping lifetime.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
data class Configuration @JvmOverloads constructor(
|
|
||||||
val httpClient: PingUploader,
|
|
||||||
val serverEndpoint: String = DEFAULT_TELEMETRY_ENDPOINT,
|
|
||||||
val channel: String? = null,
|
|
||||||
val maxEvents: Int? = null,
|
|
||||||
val enableEventTimestamps: Boolean = true,
|
|
||||||
val experimentationId: String? = null,
|
|
||||||
val enableInternalPings: Boolean = true,
|
|
||||||
val delayPingLifetimeIo: Boolean = false,
|
|
||||||
) {
|
|
||||||
// The following is required to support calling our API from Java.
|
|
||||||
companion object {
|
|
||||||
const val DEFAULT_TELEMETRY_ENDPOINT = GleanCoreConfiguration.DEFAULT_TELEMETRY_ENDPOINT
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert the Android Components configuration object to the Glean SDK
|
|
||||||
* configuration object.
|
|
||||||
*
|
|
||||||
* @return a [mozilla.telemetry.glean.config.Configuration] instance.
|
|
||||||
*/
|
|
||||||
fun toWrappedConfiguration(): GleanCoreConfiguration {
|
|
||||||
return GleanCoreConfiguration(
|
|
||||||
serverEndpoint = serverEndpoint,
|
|
||||||
channel = channel,
|
|
||||||
maxEvents = maxEvents,
|
|
||||||
httpClient = httpClient,
|
|
||||||
enableEventTimestamps = enableEventTimestamps,
|
|
||||||
experimentationId = experimentationId,
|
|
||||||
enableInternalPings = enableInternalPings,
|
|
||||||
delayPingLifetimeIo = delayPingLifetimeIo,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
package mozilla.components.service.glean.private
|
|
||||||
|
|
||||||
typealias CommonMetricData = mozilla.telemetry.glean.private.CommonMetricData
|
|
||||||
typealias EventExtras = mozilla.telemetry.glean.private.EventExtras
|
|
||||||
typealias Lifetime = mozilla.telemetry.glean.private.Lifetime
|
|
||||||
typealias NoExtras = mozilla.telemetry.glean.private.NoExtras
|
|
||||||
typealias NoReasonCodes = mozilla.telemetry.glean.private.NoReasonCodes
|
|
||||||
typealias ReasonCode = mozilla.telemetry.glean.private.ReasonCode
|
|
||||||
|
|
||||||
typealias BooleanMetricType = mozilla.telemetry.glean.private.BooleanMetricType
|
|
||||||
typealias CounterMetricType = mozilla.telemetry.glean.private.CounterMetricType
|
|
||||||
typealias CustomDistributionMetricType = mozilla.telemetry.glean.private.CustomDistributionMetricType
|
|
||||||
typealias DatetimeMetricType = mozilla.telemetry.glean.private.DatetimeMetricType
|
|
||||||
typealias DenominatorMetricType = mozilla.telemetry.glean.private.DenominatorMetricType
|
|
||||||
typealias EventMetricType<T> = mozilla.telemetry.glean.private.EventMetricType<T>
|
|
||||||
typealias HistogramMetricBase = mozilla.telemetry.glean.private.HistogramBase
|
|
||||||
typealias HistogramType = mozilla.telemetry.glean.private.HistogramType
|
|
||||||
typealias LabeledMetricType<T> = mozilla.telemetry.glean.private.LabeledMetricType<T>
|
|
||||||
typealias MemoryDistributionMetricType = mozilla.telemetry.glean.private.MemoryDistributionMetricType
|
|
||||||
typealias MemoryUnit = mozilla.telemetry.glean.private.MemoryUnit
|
|
||||||
typealias NumeratorMetricType = mozilla.telemetry.glean.private.NumeratorMetricType
|
|
||||||
typealias ObjectMetricType<T> = mozilla.telemetry.glean.private.ObjectMetricType<T>
|
|
||||||
typealias ObjectSerialize = mozilla.telemetry.glean.private.ObjectSerialize
|
|
||||||
typealias PingType<T> = mozilla.telemetry.glean.private.PingType<T>
|
|
||||||
typealias QuantityMetricType = mozilla.telemetry.glean.private.QuantityMetricType
|
|
||||||
typealias RateMetricType = mozilla.telemetry.glean.private.RateMetricType
|
|
||||||
typealias RecordedExperiment = mozilla.telemetry.glean.private.RecordedExperiment
|
|
||||||
typealias StringListMetricType = mozilla.telemetry.glean.private.StringListMetricType
|
|
||||||
typealias StringMetricType = mozilla.telemetry.glean.private.StringMetricType
|
|
||||||
typealias TextMetricType = mozilla.telemetry.glean.private.TextMetricType
|
|
||||||
typealias TimespanMetricType = mozilla.telemetry.glean.private.TimespanMetricType
|
|
||||||
typealias TimeUnit = mozilla.telemetry.glean.private.TimeUnit
|
|
||||||
typealias TimingDistributionMetricType = mozilla.telemetry.glean.private.TimingDistributionMetricType
|
|
||||||
typealias UrlMetricType = mozilla.telemetry.glean.private.UrlMetricType
|
|
||||||
typealias UuidMetricType = mozilla.telemetry.glean.private.UuidMetricType
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
package mozilla.components.service.glean.testing
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Different types of errors that can be reported through Glean's error reporting metrics.
|
|
||||||
*/
|
|
||||||
typealias ErrorType = mozilla.telemetry.glean.testing.ErrorType
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
package mozilla.components.service.glean.testing
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This implements a JUnit rule for writing tests for Glean SDK metrics.
|
|
||||||
*
|
|
||||||
* The rule takes care of sending Glean SDK pings to a local server, at the
|
|
||||||
* address: "http://localhost:<port>".
|
|
||||||
*
|
|
||||||
* This is useful for Android instrumented tests, where we don't want to
|
|
||||||
* initialize Glean more than once but still want to send pings to a local
|
|
||||||
* server for validation.
|
|
||||||
*
|
|
||||||
* FIXME(bug 1787234): State of the local server can persist across multiple test classes,
|
|
||||||
* leading to hard-to-diagnose intermittent test failures.
|
|
||||||
* It might be necessary to limit use of `GleanTestLocalServer` to a single test class for now.
|
|
||||||
*
|
|
||||||
* Example usage:
|
|
||||||
*
|
|
||||||
* ```
|
|
||||||
* // Add the following lines to you test class.
|
|
||||||
* @get:Rule
|
|
||||||
* val gleanRule = GleanTestLocalServer(3785)
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* @param localPort the port of the local ping server
|
|
||||||
*/
|
|
||||||
typealias GleanTestLocalServer = mozilla.telemetry.glean.testing.GleanTestLocalServer
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
package mozilla.components.service.glean.testing
|
|
||||||
|
|
||||||
typealias GleanTestRule = mozilla.telemetry.glean.testing.GleanTestRule
|
|
||||||
@@ -1,68 +0,0 @@
|
|||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
package mozilla.components.service.glean;
|
|
||||||
|
|
||||||
import androidx.test.core.app.ApplicationProvider;
|
|
||||||
import androidx.work.testing.WorkManagerTestInitHelper;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
|
|
||||||
import org.junit.Test;
|
|
||||||
import org.junit.runner.RunWith;
|
|
||||||
import org.robolectric.RobolectricTestRunner;
|
|
||||||
|
|
||||||
import java.util.Calendar;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import mozilla.components.lib.fetch.httpurlconnection.HttpURLConnectionClient;
|
|
||||||
import mozilla.components.service.glean.config.Configuration;
|
|
||||||
import mozilla.components.service.glean.net.ConceptFetchHttpUploader;
|
|
||||||
import mozilla.telemetry.glean.BuildInfo;
|
|
||||||
|
|
||||||
@RunWith(RobolectricTestRunner.class)
|
|
||||||
public class GleanFromJavaTest {
|
|
||||||
// The only purpose of these tests is to make sure the Glean API is
|
|
||||||
// callable from Java. If something goes wrong, it should complain about missing
|
|
||||||
// methods at build-time.
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testInitGleanWithDefaults() {
|
|
||||||
Context context = ApplicationProvider.getApplicationContext();
|
|
||||||
WorkManagerTestInitHelper.initializeTestWorkManager(context);
|
|
||||||
ConceptFetchHttpUploader httpClient = ConceptFetchHttpUploader.fromClient(new HttpURLConnectionClient());
|
|
||||||
Configuration config = new Configuration(httpClient);
|
|
||||||
BuildInfo buildInfo = new BuildInfo("test", "test", Calendar.getInstance());
|
|
||||||
Glean.INSTANCE.initialize(context, true, config, buildInfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testInitGleanWithConfiguration() {
|
|
||||||
Context context = ApplicationProvider.getApplicationContext();
|
|
||||||
WorkManagerTestInitHelper.initializeTestWorkManager(context);
|
|
||||||
ConceptFetchHttpUploader httpClient = ConceptFetchHttpUploader.fromClient(new HttpURLConnectionClient());
|
|
||||||
Configuration config =
|
|
||||||
new Configuration(httpClient, Configuration.DEFAULT_TELEMETRY_ENDPOINT, "test-channel");
|
|
||||||
BuildInfo buildInfo = new BuildInfo("test", "test", Calendar.getInstance());
|
|
||||||
Glean.INSTANCE.initialize(context, true, config, buildInfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testGleanExperimentsAPIWithDefaults() {
|
|
||||||
Glean.INSTANCE.setExperimentActive("test-exp-id-1", "test-branch-1");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testGleanExperimentsAPIWithOptional() {
|
|
||||||
Map<String, String> experimentProperties = new HashMap<>();
|
|
||||||
experimentProperties.put("test-prop1", "test-prop-result1");
|
|
||||||
|
|
||||||
Glean.INSTANCE.setExperimentActive(
|
|
||||||
"test-exp-id-1",
|
|
||||||
"test-branch-1",
|
|
||||||
experimentProperties
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
package mozilla.components.service.glean
|
|
||||||
|
|
||||||
import android.content.Context
|
|
||||||
import androidx.test.core.app.ApplicationProvider
|
|
||||||
import mozilla.components.service.glean.private.BooleanMetricType
|
|
||||||
import mozilla.components.service.glean.private.CommonMetricData
|
|
||||||
import mozilla.components.service.glean.private.Lifetime
|
|
||||||
import mozilla.components.service.glean.testing.GleanTestRule
|
|
||||||
import org.junit.Assert.assertTrue
|
|
||||||
import org.junit.Rule
|
|
||||||
import org.junit.Test
|
|
||||||
import org.junit.runner.RunWith
|
|
||||||
import org.robolectric.RobolectricTestRunner
|
|
||||||
|
|
||||||
@RunWith(RobolectricTestRunner::class)
|
|
||||||
class GleanTest {
|
|
||||||
private val context: Context
|
|
||||||
get() = ApplicationProvider.getApplicationContext()
|
|
||||||
|
|
||||||
@get:Rule
|
|
||||||
val gleanRule = GleanTestRule(context)
|
|
||||||
|
|
||||||
@Test
|
|
||||||
fun `Glean correctly initializes and records a metric`() {
|
|
||||||
// Define a 'booleanMetric' boolean metric, which will be stored in "store1"
|
|
||||||
val booleanMetric = BooleanMetricType(
|
|
||||||
CommonMetricData(
|
|
||||||
disabled = false,
|
|
||||||
category = "telemetry",
|
|
||||||
lifetime = Lifetime.APPLICATION,
|
|
||||||
name = "boolean_metric",
|
|
||||||
sendInPings = listOf("store1"),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
booleanMetric.set(true)
|
|
||||||
|
|
||||||
assertTrue(booleanMetric.testGetValue()!!)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -59,7 +59,7 @@ dependencies {
|
|||||||
api (ComponentsDependencies.mozilla_appservices_nimbus) {
|
api (ComponentsDependencies.mozilla_appservices_nimbus) {
|
||||||
// Use our own version of the Glean dependency,
|
// Use our own version of the Glean dependency,
|
||||||
// which might be different from the version declared by A-S.
|
// which might be different from the version declared by A-S.
|
||||||
exclude group: 'org.mozilla.components', module: 'service-glean'
|
exclude group: 'org.mozilla.telemetry', module: 'glean'
|
||||||
}
|
}
|
||||||
|
|
||||||
implementation ComponentsDependencies.androidx_core_ktx
|
implementation ComponentsDependencies.androidx_core_ktx
|
||||||
@@ -79,7 +79,7 @@ dependencies {
|
|||||||
|
|
||||||
// We only compile against GeckoView and Glean. It's up to the app to add those dependencies if it wants to
|
// We only compile against GeckoView and Glean. It's up to the app to add those dependencies if it wants to
|
||||||
// send crash reports to Socorro (GV).
|
// send crash reports to Socorro (GV).
|
||||||
compileOnly project(":service-glean")
|
compileOnly ComponentsDependencies.mozilla_glean
|
||||||
|
|
||||||
testImplementation ComponentsDependencies.mozilla_appservices_full_megazord_forUnitTests
|
testImplementation ComponentsDependencies.mozilla_appservices_full_megazord_forUnitTests
|
||||||
testImplementation ComponentsDependencies.androidx_test_core
|
testImplementation ComponentsDependencies.androidx_test_core
|
||||||
@@ -90,7 +90,7 @@ dependencies {
|
|||||||
testImplementation ComponentsDependencies.mozilla_glean_forUnitTests
|
testImplementation ComponentsDependencies.mozilla_glean_forUnitTests
|
||||||
testImplementation ComponentsDependencies.androidx_work_testing
|
testImplementation ComponentsDependencies.androidx_work_testing
|
||||||
testImplementation project(':support-test')
|
testImplementation project(':support-test')
|
||||||
testImplementation project(":service-glean")
|
testImplementation ComponentsDependencies.mozilla_glean
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: '../../../android-lint.gradle'
|
apply from: '../../../android-lint.gradle'
|
||||||
@@ -119,4 +119,5 @@ nimbus {
|
|||||||
? gradle.getProperty('localProperties.autoPublish.application-services.dir') : null
|
? gradle.getProperty('localProperties.autoPublish.application-services.dir') : null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ext.gleanNamespace = "mozilla.telemetry.glean"
|
||||||
apply plugin: "org.mozilla.telemetry.glean-gradle-plugin"
|
apply plugin: "org.mozilla.telemetry.glean-gradle-plugin"
|
||||||
|
|||||||
@@ -7,12 +7,12 @@ package mozilla.components.service.nimbus.messaging
|
|||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import androidx.core.net.toUri
|
import androidx.core.net.toUri
|
||||||
import kotlinx.coroutines.test.runTest
|
import kotlinx.coroutines.test.runTest
|
||||||
import mozilla.components.service.glean.testing.GleanTestRule
|
|
||||||
import mozilla.components.service.nimbus.GleanMetrics.Microsurvey
|
import mozilla.components.service.nimbus.GleanMetrics.Microsurvey
|
||||||
import mozilla.components.support.test.any
|
import mozilla.components.support.test.any
|
||||||
import mozilla.components.support.test.eq
|
import mozilla.components.support.test.eq
|
||||||
import mozilla.components.support.test.robolectric.testContext
|
import mozilla.components.support.test.robolectric.testContext
|
||||||
import mozilla.components.support.test.rule.MainCoroutineRule
|
import mozilla.components.support.test.rule.MainCoroutineRule
|
||||||
|
import mozilla.telemetry.glean.testing.GleanTestRule
|
||||||
import org.junit.Assert.assertEquals
|
import org.junit.Assert.assertEquals
|
||||||
import org.junit.Assert.assertFalse
|
import org.junit.Assert.assertFalse
|
||||||
import org.junit.Assert.assertNotNull
|
import org.junit.Assert.assertNotNull
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ dependencies {
|
|||||||
api (ComponentsDependencies.mozilla_appservices_logins) {
|
api (ComponentsDependencies.mozilla_appservices_logins) {
|
||||||
// Use our own version of the Glean dependency,
|
// Use our own version of the Glean dependency,
|
||||||
// which might be different from the version declared by A-S.
|
// which might be different from the version declared by A-S.
|
||||||
exclude group: 'org.mozilla.components', module: 'service-glean'
|
exclude group: 'org.mozilla.telemetry', module: 'glean'
|
||||||
}
|
}
|
||||||
api ComponentsDependencies.mozilla_appservices_sync15
|
api ComponentsDependencies.mozilla_appservices_sync15
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ dependencies {
|
|||||||
|
|
||||||
implementation project(':concept-storage')
|
implementation project(':concept-storage')
|
||||||
implementation project(':support-utils')
|
implementation project(':support-utils')
|
||||||
implementation project(':service-glean')
|
implementation ComponentsDependencies.mozilla_glean
|
||||||
|
|
||||||
implementation ComponentsDependencies.kotlin_coroutines
|
implementation ComponentsDependencies.kotlin_coroutines
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -209,7 +209,6 @@ object ComponentsDependencies {
|
|||||||
|
|
||||||
val mozilla_appservices_fxaclient = "${ApplicationServicesConfig.groupId}:fxaclient:${ApplicationServicesConfig.version}"
|
val mozilla_appservices_fxaclient = "${ApplicationServicesConfig.groupId}:fxaclient:${ApplicationServicesConfig.version}"
|
||||||
val mozilla_appservices_nimbus = "${ApplicationServicesConfig.groupId}:nimbus:${ApplicationServicesConfig.version}"
|
val mozilla_appservices_nimbus = "${ApplicationServicesConfig.groupId}:nimbus:${ApplicationServicesConfig.version}"
|
||||||
const val mozilla_glean_forUnitTests = "org.mozilla.telemetry:glean-native-forUnitTests:${Versions.mozilla_glean}"
|
|
||||||
val mozilla_appservices_autofill = "${ApplicationServicesConfig.groupId}:autofill:${ApplicationServicesConfig.version}"
|
val mozilla_appservices_autofill = "${ApplicationServicesConfig.groupId}:autofill:${ApplicationServicesConfig.version}"
|
||||||
val mozilla_appservices_logins = "${ApplicationServicesConfig.groupId}:logins:${ApplicationServicesConfig.version}"
|
val mozilla_appservices_logins = "${ApplicationServicesConfig.groupId}:logins:${ApplicationServicesConfig.version}"
|
||||||
val mozilla_appservices_places = "${ApplicationServicesConfig.groupId}:places:${ApplicationServicesConfig.version}"
|
val mozilla_appservices_places = "${ApplicationServicesConfig.groupId}:places:${ApplicationServicesConfig.version}"
|
||||||
@@ -226,6 +225,9 @@ object ComponentsDependencies {
|
|||||||
val mozilla_appservices_rust_log_forwarder = "${ApplicationServicesConfig.groupId}:rust-log-forwarder:${ApplicationServicesConfig.version}"
|
val mozilla_appservices_rust_log_forwarder = "${ApplicationServicesConfig.groupId}:rust-log-forwarder:${ApplicationServicesConfig.version}"
|
||||||
val mozilla_appservices_sync15 = "${ApplicationServicesConfig.groupId}:sync15:${ApplicationServicesConfig.version}"
|
val mozilla_appservices_sync15 = "${ApplicationServicesConfig.groupId}:sync15:${ApplicationServicesConfig.version}"
|
||||||
|
|
||||||
|
const val mozilla_glean = "org.mozilla.telemetry:glean:${Versions.mozilla_glean}"
|
||||||
|
const val mozilla_glean_forUnitTests = "org.mozilla.telemetry:glean-native-forUnitTests:${Versions.mozilla_glean}"
|
||||||
|
|
||||||
const val thirdparty_okhttp = "com.squareup.okhttp3:okhttp:${Versions.okhttp}"
|
const val thirdparty_okhttp = "com.squareup.okhttp3:okhttp:${Versions.okhttp}"
|
||||||
const val thirdparty_okhttp_urlconnection = "com.squareup.okhttp3:okhttp-urlconnection:${Versions.okhttp}"
|
const val thirdparty_okhttp_urlconnection = "com.squareup.okhttp3:okhttp-urlconnection:${Versions.okhttp}"
|
||||||
const val thirdparty_okio = "com.squareup.okio:okio:${Versions.okio}"
|
const val thirdparty_okio = "com.squareup.okio:okio:${Versions.okio}"
|
||||||
|
|||||||
@@ -135,10 +135,12 @@ dependencies {
|
|||||||
implementation project(':ui-tabcounter')
|
implementation project(':ui-tabcounter')
|
||||||
implementation project(':ui-widgets')
|
implementation project(':ui-widgets')
|
||||||
|
|
||||||
// Add a dependency on service-glean to simplify the testing workflow
|
// Add a dependency on glean to simplify the testing workflow
|
||||||
// for engineers that want to test Gecko metrics exfiltrated via the Glean
|
// for engineers that want to test Gecko metrics exfiltrated via the Glean
|
||||||
// SDK. See bug 1592935 for more context.
|
// SDK. See bug 1592935 for more context.
|
||||||
implementation project(':service-glean')
|
implementation project(":service-glean")
|
||||||
|
implementation ComponentsDependencies.mozilla_glean
|
||||||
|
|
||||||
implementation project(':service-location')
|
implementation project(':service-location')
|
||||||
implementation project(':service-digitalassetlinks')
|
implementation project(':service-digitalassetlinks')
|
||||||
implementation project(':service-sync-logins')
|
implementation project(':service-sync-logins')
|
||||||
|
|||||||
@@ -14,9 +14,6 @@ import mozilla.components.browser.state.action.SystemAction
|
|||||||
import mozilla.components.browser.storage.sync.GlobalPlacesDependencyProvider
|
import mozilla.components.browser.storage.sync.GlobalPlacesDependencyProvider
|
||||||
import mozilla.components.feature.addons.update.GlobalAddonDependencyProvider
|
import mozilla.components.feature.addons.update.GlobalAddonDependencyProvider
|
||||||
import mozilla.components.lib.fetch.httpurlconnection.HttpURLConnectionClient
|
import mozilla.components.lib.fetch.httpurlconnection.HttpURLConnectionClient
|
||||||
import mozilla.components.service.glean.BuildInfo
|
|
||||||
import mozilla.components.service.glean.Glean
|
|
||||||
import mozilla.components.service.glean.config.Configuration
|
|
||||||
import mozilla.components.service.glean.net.ConceptFetchHttpUploader
|
import mozilla.components.service.glean.net.ConceptFetchHttpUploader
|
||||||
import mozilla.components.support.base.facts.Facts
|
import mozilla.components.support.base.facts.Facts
|
||||||
import mozilla.components.support.base.facts.processor.LogFactProcessor
|
import mozilla.components.support.base.facts.processor.LogFactProcessor
|
||||||
@@ -27,6 +24,9 @@ import mozilla.components.support.ktx.android.content.isMainProcess
|
|||||||
import mozilla.components.support.ktx.android.content.runOnlyInMainProcess
|
import mozilla.components.support.ktx.android.content.runOnlyInMainProcess
|
||||||
import mozilla.components.support.rustlog.RustLog
|
import mozilla.components.support.rustlog.RustLog
|
||||||
import mozilla.components.support.webextensions.WebExtensionSupport
|
import mozilla.components.support.webextensions.WebExtensionSupport
|
||||||
|
import mozilla.telemetry.glean.BuildInfo
|
||||||
|
import mozilla.telemetry.glean.Glean
|
||||||
|
import mozilla.telemetry.glean.config.Configuration
|
||||||
import java.util.Calendar
|
import java.util.Calendar
|
||||||
import java.util.TimeZone
|
import java.util.TimeZone
|
||||||
import java.util.concurrent.TimeUnit
|
import java.util.concurrent.TimeUnit
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ android {
|
|||||||
dependencies {
|
dependencies {
|
||||||
implementation project(':lib-crash')
|
implementation project(':lib-crash')
|
||||||
implementation project(':lib-fetch-httpurlconnection')
|
implementation project(':lib-fetch-httpurlconnection')
|
||||||
|
implementation ComponentsDependencies.mozilla_glean
|
||||||
implementation project(':service-glean')
|
implementation project(':service-glean')
|
||||||
implementation project(':support-base')
|
implementation project(':support-base')
|
||||||
implementation project(':support-utils')
|
implementation project(':support-utils')
|
||||||
|
|||||||
@@ -20,14 +20,14 @@ import mozilla.components.lib.crash.CrashReporter
|
|||||||
import mozilla.components.lib.crash.service.CrashReporterService
|
import mozilla.components.lib.crash.service.CrashReporterService
|
||||||
import mozilla.components.lib.crash.service.GleanCrashReporterService
|
import mozilla.components.lib.crash.service.GleanCrashReporterService
|
||||||
import mozilla.components.lib.fetch.httpurlconnection.HttpURLConnectionClient
|
import mozilla.components.lib.fetch.httpurlconnection.HttpURLConnectionClient
|
||||||
import mozilla.components.service.glean.BuildInfo
|
|
||||||
import mozilla.components.service.glean.Glean
|
|
||||||
import mozilla.components.service.glean.config.Configuration
|
|
||||||
import mozilla.components.service.glean.net.ConceptFetchHttpUploader
|
import mozilla.components.service.glean.net.ConceptFetchHttpUploader
|
||||||
import mozilla.components.support.base.android.NotificationsDelegate
|
import mozilla.components.support.base.android.NotificationsDelegate
|
||||||
import mozilla.components.support.base.log.Log
|
import mozilla.components.support.base.log.Log
|
||||||
import mozilla.components.support.base.log.sink.AndroidLogSink
|
import mozilla.components.support.base.log.sink.AndroidLogSink
|
||||||
import mozilla.components.support.utils.PendingIntentUtils
|
import mozilla.components.support.utils.PendingIntentUtils
|
||||||
|
import mozilla.telemetry.glean.BuildInfo
|
||||||
|
import mozilla.telemetry.glean.Glean
|
||||||
|
import mozilla.telemetry.glean.config.Configuration
|
||||||
import java.util.Calendar
|
import java.util.Calendar
|
||||||
import java.util.TimeZone
|
import java.util.TimeZone
|
||||||
import java.util.UUID
|
import java.util.UUID
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
implementation ComponentsDependencies.mozilla_glean
|
||||||
implementation project(':service-glean')
|
implementation project(':service-glean')
|
||||||
implementation project(':service-nimbus')
|
implementation project(':service-nimbus')
|
||||||
implementation project(':support-base')
|
implementation project(':support-base')
|
||||||
@@ -87,4 +88,5 @@ dependencies {
|
|||||||
androidTestImplementation ComponentsDependencies.testing_mockwebserver
|
androidTestImplementation ComponentsDependencies.testing_mockwebserver
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ext.gleanNamespace = "mozilla.telemetry.glean"
|
||||||
apply plugin: "org.mozilla.telemetry.glean-gradle-plugin"
|
apply plugin: "org.mozilla.telemetry.glean-gradle-plugin"
|
||||||
|
|||||||
@@ -48,8 +48,9 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation project(':service-glean')
|
implementation ComponentsDependencies.mozilla_glean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ext.gleanNamespace = "mozilla.telemetry.glean"
|
||||||
apply plugin: "org.mozilla.telemetry.glean-gradle-plugin"
|
apply plugin: "org.mozilla.telemetry.glean-gradle-plugin"
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
|
|
||||||
package org.mozilla.samples.glean.library
|
package org.mozilla.samples.glean.library
|
||||||
|
|
||||||
import mozilla.components.service.glean.Glean
|
|
||||||
import mozilla.samples.glean.library.GleanMetrics.SampleMetrics
|
import mozilla.samples.glean.library.GleanMetrics.SampleMetrics
|
||||||
|
import mozilla.telemetry.glean.Glean
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* These are just simple functions to test calling the Glean API
|
* These are just simple functions to test calling the Glean API
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import androidx.test.core.app.ApplicationProvider
|
|||||||
import androidx.test.ext.junit.rules.ActivityScenarioRule
|
import androidx.test.ext.junit.rules.ActivityScenarioRule
|
||||||
import androidx.test.platform.app.InstrumentationRegistry
|
import androidx.test.platform.app.InstrumentationRegistry
|
||||||
import androidx.test.uiautomator.UiDevice
|
import androidx.test.uiautomator.UiDevice
|
||||||
import mozilla.components.service.glean.testing.GleanTestLocalServer
|
import mozilla.telemetry.glean.testing.GleanTestLocalServer
|
||||||
import okhttp3.mockwebserver.Dispatcher
|
import okhttp3.mockwebserver.Dispatcher
|
||||||
import okhttp3.mockwebserver.MockResponse
|
import okhttp3.mockwebserver.MockResponse
|
||||||
import okhttp3.mockwebserver.MockWebServer
|
import okhttp3.mockwebserver.MockWebServer
|
||||||
|
|||||||
@@ -8,8 +8,6 @@ import android.app.Application
|
|||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import mozilla.components.lib.fetch.httpurlconnection.HttpURLConnectionClient
|
import mozilla.components.lib.fetch.httpurlconnection.HttpURLConnectionClient
|
||||||
import mozilla.components.service.glean.Glean
|
|
||||||
import mozilla.components.service.glean.config.Configuration
|
|
||||||
import mozilla.components.service.glean.net.ConceptFetchHttpUploader
|
import mozilla.components.service.glean.net.ConceptFetchHttpUploader
|
||||||
import mozilla.components.service.nimbus.Nimbus
|
import mozilla.components.service.nimbus.Nimbus
|
||||||
import mozilla.components.service.nimbus.NimbusApi
|
import mozilla.components.service.nimbus.NimbusApi
|
||||||
@@ -19,6 +17,8 @@ import mozilla.components.support.base.log.Log
|
|||||||
import mozilla.components.support.base.log.sink.AndroidLogSink
|
import mozilla.components.support.base.log.sink.AndroidLogSink
|
||||||
import mozilla.components.support.rusthttp.RustHttpConfig
|
import mozilla.components.support.rusthttp.RustHttpConfig
|
||||||
import mozilla.components.support.rustlog.RustLog
|
import mozilla.components.support.rustlog.RustLog
|
||||||
|
import mozilla.telemetry.glean.Glean
|
||||||
|
import mozilla.telemetry.glean.config.Configuration
|
||||||
import org.mozilla.samples.glean.GleanMetrics.Basic
|
import org.mozilla.samples.glean.GleanMetrics.Basic
|
||||||
import org.mozilla.samples.glean.GleanMetrics.Custom
|
import org.mozilla.samples.glean.GleanMetrics.Custom
|
||||||
import org.mozilla.samples.glean.GleanMetrics.GleanBuildInfo
|
import org.mozilla.samples.glean.GleanMetrics.GleanBuildInfo
|
||||||
|
|||||||
@@ -521,6 +521,7 @@ android.applicationVariants.configureEach { variant ->
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Generate Kotlin code for the Fenix Glean metrics.
|
// Generate Kotlin code for the Fenix Glean metrics.
|
||||||
|
ext.gleanNamespace = "mozilla.telemetry.glean"
|
||||||
apply plugin: "org.mozilla.telemetry.glean-gradle-plugin"
|
apply plugin: "org.mozilla.telemetry.glean-gradle-plugin"
|
||||||
apply plugin: "org.mozilla.appservices.nimbus-gradle-plugin"
|
apply plugin: "org.mozilla.appservices.nimbus-gradle-plugin"
|
||||||
|
|
||||||
@@ -643,6 +644,7 @@ dependencies {
|
|||||||
implementation project(':service-sync-logins')
|
implementation project(':service-sync-logins')
|
||||||
implementation project(':service-firefox-accounts')
|
implementation project(':service-firefox-accounts')
|
||||||
implementation project(':service-glean')
|
implementation project(':service-glean')
|
||||||
|
implementation ComponentsDependencies.mozilla_glean
|
||||||
implementation project(':service-location')
|
implementation project(':service-location')
|
||||||
implementation project(':service-nimbus')
|
implementation project(':service-nimbus')
|
||||||
|
|
||||||
|
|||||||
@@ -18,10 +18,10 @@ import kotlinx.coroutines.Dispatchers
|
|||||||
import kotlinx.coroutines.GlobalScope
|
import kotlinx.coroutines.GlobalScope
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import mozilla.components.browser.engine.gecko.fetch.GeckoViewFetchClient
|
import mozilla.components.browser.engine.gecko.fetch.GeckoViewFetchClient
|
||||||
import mozilla.components.service.glean.Glean
|
|
||||||
import mozilla.components.service.glean.config.Configuration
|
|
||||||
import mozilla.components.service.glean.net.ConceptFetchHttpUploader
|
import mozilla.components.service.glean.net.ConceptFetchHttpUploader
|
||||||
import mozilla.components.service.glean.testing.GleanTestLocalServer
|
import mozilla.telemetry.glean.Glean
|
||||||
|
import mozilla.telemetry.glean.config.Configuration
|
||||||
|
import mozilla.telemetry.glean.testing.GleanTestLocalServer
|
||||||
import okhttp3.mockwebserver.RecordedRequest
|
import okhttp3.mockwebserver.RecordedRequest
|
||||||
import org.json.JSONObject
|
import org.json.JSONObject
|
||||||
import org.junit.Assert.assertFalse
|
import org.junit.Assert.assertFalse
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import android.os.Process
|
|||||||
import androidx.test.core.app.ApplicationProvider
|
import androidx.test.core.app.ApplicationProvider
|
||||||
import androidx.test.platform.app.InstrumentationRegistry
|
import androidx.test.platform.app.InstrumentationRegistry
|
||||||
import androidx.test.rule.ActivityTestRule
|
import androidx.test.rule.ActivityTestRule
|
||||||
import mozilla.components.service.glean.testing.GleanTestLocalServer
|
import mozilla.telemetry.glean.testing.GleanTestLocalServer
|
||||||
import org.hamcrest.CoreMatchers.anyOf
|
import org.hamcrest.CoreMatchers.anyOf
|
||||||
import org.hamcrest.CoreMatchers.`is`
|
import org.hamcrest.CoreMatchers.`is`
|
||||||
import org.hamcrest.MatcherAssert.assertThat
|
import org.hamcrest.MatcherAssert.assertThat
|
||||||
|
|||||||
@@ -52,8 +52,6 @@ import mozilla.components.feature.top.sites.TopSitesFrecencyConfig
|
|||||||
import mozilla.components.feature.top.sites.TopSitesProviderConfig
|
import mozilla.components.feature.top.sites.TopSitesProviderConfig
|
||||||
import mozilla.components.lib.crash.CrashReporter
|
import mozilla.components.lib.crash.CrashReporter
|
||||||
import mozilla.components.service.fxa.manager.SyncEnginesStorage
|
import mozilla.components.service.fxa.manager.SyncEnginesStorage
|
||||||
import mozilla.components.service.glean.Glean
|
|
||||||
import mozilla.components.service.glean.config.Configuration
|
|
||||||
import mozilla.components.service.glean.net.ConceptFetchHttpUploader
|
import mozilla.components.service.glean.net.ConceptFetchHttpUploader
|
||||||
import mozilla.components.service.sync.logins.LoginsApiException
|
import mozilla.components.service.sync.logins.LoginsApiException
|
||||||
import mozilla.components.support.base.ext.areNotificationsEnabledSafe
|
import mozilla.components.support.base.ext.areNotificationsEnabledSafe
|
||||||
@@ -72,6 +70,8 @@ import mozilla.components.support.rustlog.RustLog
|
|||||||
import mozilla.components.support.utils.BrowsersCache
|
import mozilla.components.support.utils.BrowsersCache
|
||||||
import mozilla.components.support.utils.logElapsedTime
|
import mozilla.components.support.utils.logElapsedTime
|
||||||
import mozilla.components.support.webextensions.WebExtensionSupport
|
import mozilla.components.support.webextensions.WebExtensionSupport
|
||||||
|
import mozilla.telemetry.glean.Glean
|
||||||
|
import mozilla.telemetry.glean.config.Configuration
|
||||||
import org.mozilla.fenix.GleanMetrics.Addons
|
import org.mozilla.fenix.GleanMetrics.Addons
|
||||||
import org.mozilla.fenix.GleanMetrics.Addresses
|
import org.mozilla.fenix.GleanMetrics.Addresses
|
||||||
import org.mozilla.fenix.GleanMetrics.AndroidAutofill
|
import org.mozilla.fenix.GleanMetrics.AndroidAutofill
|
||||||
@@ -212,7 +212,7 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Set the metric configuration from Nimbus.
|
// Set the metric configuration from Nimbus.
|
||||||
Glean.applyServerKnobsConfig(FxNimbus.features.glean.value().metricsEnabled)
|
Glean.applyServerKnobsConfig(FxNimbus.features.glean.value().metricsEnabled.toString())
|
||||||
|
|
||||||
Glean.initialize(
|
Glean.initialize(
|
||||||
applicationContext = this,
|
applicationContext = this,
|
||||||
|
|||||||
@@ -117,7 +117,6 @@ import mozilla.components.feature.webauthn.WebAuthnFeature
|
|||||||
import mozilla.components.lib.state.ext.consumeFlow
|
import mozilla.components.lib.state.ext.consumeFlow
|
||||||
import mozilla.components.lib.state.ext.consumeFrom
|
import mozilla.components.lib.state.ext.consumeFrom
|
||||||
import mozilla.components.lib.state.ext.flowScoped
|
import mozilla.components.lib.state.ext.flowScoped
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
|
||||||
import mozilla.components.service.sync.autofill.DefaultCreditCardValidationDelegate
|
import mozilla.components.service.sync.autofill.DefaultCreditCardValidationDelegate
|
||||||
import mozilla.components.service.sync.logins.DefaultLoginValidationDelegate
|
import mozilla.components.service.sync.logins.DefaultLoginValidationDelegate
|
||||||
import mozilla.components.service.sync.logins.LoginsApiException
|
import mozilla.components.service.sync.logins.LoginsApiException
|
||||||
@@ -133,6 +132,7 @@ import mozilla.components.support.ktx.kotlin.getOrigin
|
|||||||
import mozilla.components.support.ktx.kotlinx.coroutines.flow.ifAnyChanged
|
import mozilla.components.support.ktx.kotlinx.coroutines.flow.ifAnyChanged
|
||||||
import mozilla.components.support.locale.ActivityContextWrapper
|
import mozilla.components.support.locale.ActivityContextWrapper
|
||||||
import mozilla.components.ui.widgets.withCenterAlignedButtons
|
import mozilla.components.ui.widgets.withCenterAlignedButtons
|
||||||
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.BuildConfig
|
import org.mozilla.fenix.BuildConfig
|
||||||
import org.mozilla.fenix.FeatureFlags
|
import org.mozilla.fenix.FeatureFlags
|
||||||
import org.mozilla.fenix.GleanMetrics.Events
|
import org.mozilla.fenix.GleanMetrics.Events
|
||||||
|
|||||||
@@ -31,10 +31,10 @@ import mozilla.components.feature.contextmenu.ContextMenuCandidate
|
|||||||
import mozilla.components.feature.readerview.ReaderViewFeature
|
import mozilla.components.feature.readerview.ReaderViewFeature
|
||||||
import mozilla.components.feature.tab.collections.TabCollection
|
import mozilla.components.feature.tab.collections.TabCollection
|
||||||
import mozilla.components.feature.tabs.WindowFeature
|
import mozilla.components.feature.tabs.WindowFeature
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
|
||||||
import mozilla.components.support.base.feature.UserInteractionHandler
|
import mozilla.components.support.base.feature.UserInteractionHandler
|
||||||
import mozilla.components.support.base.feature.ViewBoundFeatureWrapper
|
import mozilla.components.support.base.feature.ViewBoundFeatureWrapper
|
||||||
import mozilla.components.support.utils.ext.isLandscape
|
import mozilla.components.support.utils.ext.isLandscape
|
||||||
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.GleanMetrics.AddressToolbar
|
import org.mozilla.fenix.GleanMetrics.AddressToolbar
|
||||||
import org.mozilla.fenix.GleanMetrics.ReaderMode
|
import org.mozilla.fenix.GleanMetrics.ReaderMode
|
||||||
import org.mozilla.fenix.GleanMetrics.Shopping
|
import org.mozilla.fenix.GleanMetrics.Shopping
|
||||||
|
|||||||
@@ -39,10 +39,10 @@ import mozilla.components.service.fxa.manager.SCOPE_SYNC
|
|||||||
import mozilla.components.service.fxa.store.SyncStore
|
import mozilla.components.service.fxa.store.SyncStore
|
||||||
import mozilla.components.service.fxa.store.SyncStoreSupport
|
import mozilla.components.service.fxa.store.SyncStoreSupport
|
||||||
import mozilla.components.service.fxa.sync.GlobalSyncableStoreProvider
|
import mozilla.components.service.fxa.sync.GlobalSyncableStoreProvider
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
|
||||||
import mozilla.components.service.sync.autofill.AutofillCreditCardsAddressesStorage
|
import mozilla.components.service.sync.autofill.AutofillCreditCardsAddressesStorage
|
||||||
import mozilla.components.service.sync.logins.SyncableLoginsStorage
|
import mozilla.components.service.sync.logins.SyncableLoginsStorage
|
||||||
import mozilla.components.support.utils.RunWhenReadyQueue
|
import mozilla.components.support.utils.RunWhenReadyQueue
|
||||||
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.Config
|
import org.mozilla.fenix.Config
|
||||||
import org.mozilla.fenix.FeatureFlags
|
import org.mozilla.fenix.FeatureFlags
|
||||||
import org.mozilla.fenix.GleanMetrics.SyncAuth
|
import org.mozilla.fenix.GleanMetrics.SyncAuth
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ import androidx.annotation.VisibleForTesting
|
|||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
|
||||||
import mozilla.components.support.base.log.logger.Logger
|
import mozilla.components.support.base.log.logger.Logger
|
||||||
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.Config
|
import org.mozilla.fenix.Config
|
||||||
import org.mozilla.fenix.GleanMetrics.Events
|
import org.mozilla.fenix.GleanMetrics.Events
|
||||||
import org.mozilla.fenix.GleanMetrics.FirstSession
|
import org.mozilla.fenix.GleanMetrics.FirstSession
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
package org.mozilla.fenix.components.metrics
|
package org.mozilla.fenix.components.metrics
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import mozilla.components.service.glean.Glean
|
|
||||||
import mozilla.components.support.base.log.logger.Logger
|
import mozilla.components.support.base.log.logger.Logger
|
||||||
|
import mozilla.telemetry.glean.Glean
|
||||||
import org.mozilla.fenix.GleanMetrics.Pings
|
import org.mozilla.fenix.GleanMetrics.Pings
|
||||||
import org.mozilla.fenix.ext.components
|
import org.mozilla.fenix.ext.components
|
||||||
|
|
||||||
|
|||||||
@@ -44,8 +44,8 @@ import mozilla.components.compose.cfr.CFRPopup.PopupAlignment.INDICATOR_CENTERED
|
|||||||
import mozilla.components.compose.cfr.CFRPopupProperties
|
import mozilla.components.compose.cfr.CFRPopupProperties
|
||||||
import mozilla.components.concept.engine.EngineSession.CookieBannerHandlingStatus
|
import mozilla.components.concept.engine.EngineSession.CookieBannerHandlingStatus
|
||||||
import mozilla.components.lib.state.ext.flowScoped
|
import mozilla.components.lib.state.ext.flowScoped
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
|
||||||
import mozilla.components.support.ktx.kotlinx.coroutines.flow.ifAnyChanged
|
import mozilla.components.support.ktx.kotlinx.coroutines.flow.ifAnyChanged
|
||||||
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.GleanMetrics.CookieBanners
|
import org.mozilla.fenix.GleanMetrics.CookieBanners
|
||||||
import org.mozilla.fenix.GleanMetrics.Shopping
|
import org.mozilla.fenix.GleanMetrics.Shopping
|
||||||
import org.mozilla.fenix.GleanMetrics.TrackingProtection
|
import org.mozilla.fenix.GleanMetrics.TrackingProtection
|
||||||
|
|||||||
@@ -16,9 +16,9 @@ import mozilla.components.browser.state.store.BrowserStore
|
|||||||
import mozilla.components.concept.engine.EngineView
|
import mozilla.components.concept.engine.EngineView
|
||||||
import mozilla.components.concept.engine.prompt.ShareData
|
import mozilla.components.concept.engine.prompt.ShareData
|
||||||
import mozilla.components.feature.tabs.TabsUseCases
|
import mozilla.components.feature.tabs.TabsUseCases
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
|
||||||
import mozilla.components.support.ktx.kotlin.isUrl
|
import mozilla.components.support.ktx.kotlin.isUrl
|
||||||
import mozilla.components.ui.tabcounter.TabCounterMenu
|
import mozilla.components.ui.tabcounter.TabCounterMenu
|
||||||
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.GleanMetrics.Events
|
import org.mozilla.fenix.GleanMetrics.Events
|
||||||
import org.mozilla.fenix.GleanMetrics.NavigationBar
|
import org.mozilla.fenix.GleanMetrics.NavigationBar
|
||||||
import org.mozilla.fenix.GleanMetrics.ReaderMode
|
import org.mozilla.fenix.GleanMetrics.ReaderMode
|
||||||
|
|||||||
@@ -27,9 +27,9 @@ import mozilla.components.feature.session.SessionFeature
|
|||||||
import mozilla.components.feature.top.sites.DefaultTopSitesStorage
|
import mozilla.components.feature.top.sites.DefaultTopSitesStorage
|
||||||
import mozilla.components.feature.top.sites.PinnedSiteStorage
|
import mozilla.components.feature.top.sites.PinnedSiteStorage
|
||||||
import mozilla.components.feature.top.sites.TopSite
|
import mozilla.components.feature.top.sites.TopSite
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
|
||||||
import mozilla.components.support.base.feature.ViewBoundFeatureWrapper
|
import mozilla.components.support.base.feature.ViewBoundFeatureWrapper
|
||||||
import mozilla.components.ui.widgets.withCenterAlignedButtons
|
import mozilla.components.ui.widgets.withCenterAlignedButtons
|
||||||
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.GleanMetrics.AppMenu
|
import org.mozilla.fenix.GleanMetrics.AppMenu
|
||||||
import org.mozilla.fenix.GleanMetrics.Collections
|
import org.mozilla.fenix.GleanMetrics.Collections
|
||||||
import org.mozilla.fenix.GleanMetrics.Events
|
import org.mozilla.fenix.GleanMetrics.Events
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ package org.mozilla.fenix.ext
|
|||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import androidx.preference.PreferenceManager
|
import androidx.preference.PreferenceManager
|
||||||
import mozilla.components.service.glean.config.Configuration
|
import mozilla.telemetry.glean.config.Configuration
|
||||||
import org.mozilla.fenix.BuildConfig
|
import org.mozilla.fenix.BuildConfig
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
|
|
||||||
|
|||||||
@@ -86,10 +86,10 @@ import mozilla.components.feature.top.sites.TopSitesFrecencyConfig
|
|||||||
import mozilla.components.feature.top.sites.TopSitesProviderConfig
|
import mozilla.components.feature.top.sites.TopSitesProviderConfig
|
||||||
import mozilla.components.lib.state.ext.consumeFlow
|
import mozilla.components.lib.state.ext.consumeFlow
|
||||||
import mozilla.components.lib.state.ext.consumeFrom
|
import mozilla.components.lib.state.ext.consumeFrom
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
|
||||||
import mozilla.components.support.base.feature.ViewBoundFeatureWrapper
|
import mozilla.components.support.base.feature.ViewBoundFeatureWrapper
|
||||||
import mozilla.components.ui.colors.PhotonColors
|
import mozilla.components.ui.colors.PhotonColors
|
||||||
import mozilla.components.ui.tabcounter.TabCounterMenu
|
import mozilla.components.ui.tabcounter.TabCounterMenu
|
||||||
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.BrowserDirection
|
import org.mozilla.fenix.BrowserDirection
|
||||||
import org.mozilla.fenix.GleanMetrics.HomeScreen
|
import org.mozilla.fenix.GleanMetrics.HomeScreen
|
||||||
import org.mozilla.fenix.GleanMetrics.Homepage
|
import org.mozilla.fenix.GleanMetrics.Homepage
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import mozilla.appservices.fxaclient.contentUrl
|
|||||||
import mozilla.appservices.places.BookmarkRoot
|
import mozilla.appservices.places.BookmarkRoot
|
||||||
import mozilla.components.browser.menu.view.MenuButton
|
import mozilla.components.browser.menu.view.MenuButton
|
||||||
import mozilla.components.concept.sync.FxAEntryPoint
|
import mozilla.components.concept.sync.FxAEntryPoint
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.BrowserDirection
|
import org.mozilla.fenix.BrowserDirection
|
||||||
import org.mozilla.fenix.GleanMetrics.Events
|
import org.mozilla.fenix.GleanMetrics.Events
|
||||||
import org.mozilla.fenix.GleanMetrics.HomeScreen
|
import org.mozilla.fenix.GleanMetrics.HomeScreen
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import androidx.compose.ui.platform.ComposeView
|
|||||||
import androidx.compose.ui.res.stringResource
|
import androidx.compose.ui.res.stringResource
|
||||||
import androidx.lifecycle.LifecycleOwner
|
import androidx.lifecycle.LifecycleOwner
|
||||||
import mozilla.components.lib.state.ext.observeAsComposableState
|
import mozilla.components.lib.state.ext.observeAsComposableState
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.GleanMetrics.HomeBookmarks
|
import org.mozilla.fenix.GleanMetrics.HomeBookmarks
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
import org.mozilla.fenix.components.components
|
import org.mozilla.fenix.components.components
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ package org.mozilla.fenix.home.intent
|
|||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import androidx.navigation.NavController
|
import androidx.navigation.NavController
|
||||||
import androidx.navigation.navOptions
|
import androidx.navigation.navOptions
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.GleanMetrics.SearchWidget
|
import org.mozilla.fenix.GleanMetrics.SearchWidget
|
||||||
import org.mozilla.fenix.HomeActivity
|
import org.mozilla.fenix.HomeActivity
|
||||||
import org.mozilla.fenix.NavGraphDirections
|
import org.mozilla.fenix.NavGraphDirections
|
||||||
|
|||||||
@@ -4,11 +4,11 @@
|
|||||||
|
|
||||||
package org.mozilla.fenix.home.pocket
|
package org.mozilla.fenix.home.pocket
|
||||||
|
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
|
||||||
import mozilla.components.service.pocket.PocketStory
|
import mozilla.components.service.pocket.PocketStory
|
||||||
import mozilla.components.service.pocket.PocketStory.PocketRecommendedStory
|
import mozilla.components.service.pocket.PocketStory.PocketRecommendedStory
|
||||||
import mozilla.components.service.pocket.PocketStory.PocketSponsoredStory
|
import mozilla.components.service.pocket.PocketStory.PocketSponsoredStory
|
||||||
import mozilla.components.service.pocket.ext.getCurrentFlightImpressions
|
import mozilla.components.service.pocket.ext.getCurrentFlightImpressions
|
||||||
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.BrowserDirection
|
import org.mozilla.fenix.BrowserDirection
|
||||||
import org.mozilla.fenix.GleanMetrics.Pings
|
import org.mozilla.fenix.GleanMetrics.Pings
|
||||||
import org.mozilla.fenix.GleanMetrics.Pocket
|
import org.mozilla.fenix.GleanMetrics.Pocket
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ package org.mozilla.fenix.home.recenttabs.controller
|
|||||||
|
|
||||||
import androidx.navigation.NavController
|
import androidx.navigation.NavController
|
||||||
import mozilla.components.feature.tabs.TabsUseCases.SelectTabUseCase
|
import mozilla.components.feature.tabs.TabsUseCases.SelectTabUseCase
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.GleanMetrics.RecentTabs
|
import org.mozilla.fenix.GleanMetrics.RecentTabs
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
import org.mozilla.fenix.components.AppStore
|
import org.mozilla.fenix.components.AppStore
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import mozilla.components.browser.state.action.HistoryMetadataAction
|
|||||||
import mozilla.components.browser.state.store.BrowserStore
|
import mozilla.components.browser.state.store.BrowserStore
|
||||||
import mozilla.components.concept.storage.HistoryMetadataStorage
|
import mozilla.components.concept.storage.HistoryMetadataStorage
|
||||||
import mozilla.components.feature.tabs.TabsUseCases.SelectOrAddUseCase
|
import mozilla.components.feature.tabs.TabsUseCases.SelectOrAddUseCase
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.GleanMetrics.RecentSearches
|
import org.mozilla.fenix.GleanMetrics.RecentSearches
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
import org.mozilla.fenix.components.AppStore
|
import org.mozilla.fenix.components.AppStore
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import androidx.compose.ui.platform.ComposeView
|
|||||||
import androidx.compose.ui.res.stringResource
|
import androidx.compose.ui.res.stringResource
|
||||||
import androidx.lifecycle.LifecycleOwner
|
import androidx.lifecycle.LifecycleOwner
|
||||||
import mozilla.components.lib.state.ext.observeAsComposableState
|
import mozilla.components.lib.state.ext.observeAsComposableState
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.GleanMetrics.History
|
import org.mozilla.fenix.GleanMetrics.History
|
||||||
import org.mozilla.fenix.GleanMetrics.RecentlyVisitedHomepage
|
import org.mozilla.fenix.GleanMetrics.RecentlyVisitedHomepage
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ import mozilla.components.browser.state.state.selectedOrDefaultSearchEngine
|
|||||||
import mozilla.components.browser.state.store.BrowserStore
|
import mozilla.components.browser.state.store.BrowserStore
|
||||||
import mozilla.components.concept.menu.Orientation
|
import mozilla.components.concept.menu.Orientation
|
||||||
import mozilla.components.lib.state.helpers.AbstractBinding
|
import mozilla.components.lib.state.helpers.AbstractBinding
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
|
||||||
import mozilla.components.support.ktx.android.content.getColorFromAttr
|
import mozilla.components.support.ktx.android.content.getColorFromAttr
|
||||||
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.GleanMetrics.UnifiedSearch
|
import org.mozilla.fenix.GleanMetrics.UnifiedSearch
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
import org.mozilla.fenix.databinding.FragmentHomeBinding
|
import org.mozilla.fenix.databinding.FragmentHomeBinding
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ package org.mozilla.fenix.library.history.state
|
|||||||
|
|
||||||
import mozilla.components.lib.state.Middleware
|
import mozilla.components.lib.state.Middleware
|
||||||
import mozilla.components.lib.state.MiddlewareContext
|
import mozilla.components.lib.state.MiddlewareContext
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.GleanMetrics.Events
|
import org.mozilla.fenix.GleanMetrics.Events
|
||||||
import org.mozilla.fenix.library.history.History
|
import org.mozilla.fenix.library.history.History
|
||||||
import org.mozilla.fenix.library.history.HistoryFragmentAction
|
import org.mozilla.fenix.library.history.HistoryFragmentAction
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import mozilla.components.browser.state.store.BrowserStore
|
|||||||
import mozilla.components.browser.storage.sync.PlacesHistoryStorage
|
import mozilla.components.browser.storage.sync.PlacesHistoryStorage
|
||||||
import mozilla.components.concept.engine.prompt.ShareData
|
import mozilla.components.concept.engine.prompt.ShareData
|
||||||
import mozilla.components.feature.tabs.TabsUseCases
|
import mozilla.components.feature.tabs.TabsUseCases
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
import org.mozilla.fenix.components.AppStore
|
import org.mozilla.fenix.components.AppStore
|
||||||
import org.mozilla.fenix.components.appstate.AppAction
|
import org.mozilla.fenix.components.appstate.AppAction
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import mozilla.components.browser.state.store.BrowserStore
|
|||||||
import mozilla.components.concept.engine.prompt.ShareData
|
import mozilla.components.concept.engine.prompt.ShareData
|
||||||
import mozilla.components.feature.recentlyclosed.RecentlyClosedTabsStorage
|
import mozilla.components.feature.recentlyclosed.RecentlyClosedTabsStorage
|
||||||
import mozilla.components.feature.tabs.TabsUseCases
|
import mozilla.components.feature.tabs.TabsUseCases
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.BrowserDirection
|
import org.mozilla.fenix.BrowserDirection
|
||||||
import org.mozilla.fenix.GleanMetrics.RecentlyClosedTabs
|
import org.mozilla.fenix.GleanMetrics.RecentlyClosedTabs
|
||||||
import org.mozilla.fenix.HomeActivity
|
import org.mozilla.fenix.HomeActivity
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import androidx.core.content.ContextCompat.getColor
|
|||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import mozilla.components.compose.cfr.CFRPopup
|
import mozilla.components.compose.cfr.CFRPopup
|
||||||
import mozilla.components.compose.cfr.CFRPopupProperties
|
import mozilla.components.compose.cfr.CFRPopupProperties
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.GleanMetrics.Onboarding
|
import org.mozilla.fenix.GleanMetrics.Onboarding
|
||||||
import org.mozilla.fenix.GleanMetrics.RecentTabs
|
import org.mozilla.fenix.GleanMetrics.RecentTabs
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
|
|||||||
@@ -58,7 +58,6 @@ import mozilla.components.concept.toolbar.Toolbar
|
|||||||
import mozilla.components.feature.qr.QrFeature
|
import mozilla.components.feature.qr.QrFeature
|
||||||
import mozilla.components.lib.state.ext.consumeFlow
|
import mozilla.components.lib.state.ext.consumeFlow
|
||||||
import mozilla.components.lib.state.ext.consumeFrom
|
import mozilla.components.lib.state.ext.consumeFrom
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
|
||||||
import mozilla.components.support.base.coroutines.Dispatchers
|
import mozilla.components.support.base.coroutines.Dispatchers
|
||||||
import mozilla.components.support.base.feature.UserInteractionHandler
|
import mozilla.components.support.base.feature.UserInteractionHandler
|
||||||
import mozilla.components.support.base.feature.ViewBoundFeatureWrapper
|
import mozilla.components.support.base.feature.ViewBoundFeatureWrapper
|
||||||
@@ -73,6 +72,7 @@ import mozilla.components.support.ktx.android.view.showKeyboard
|
|||||||
import mozilla.components.support.ktx.kotlin.toNormalizedUrl
|
import mozilla.components.support.ktx.kotlin.toNormalizedUrl
|
||||||
import mozilla.components.ui.autocomplete.InlineAutocompleteEditText
|
import mozilla.components.ui.autocomplete.InlineAutocompleteEditText
|
||||||
import mozilla.components.ui.widgets.withCenterAlignedButtons
|
import mozilla.components.ui.widgets.withCenterAlignedButtons
|
||||||
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.BrowserDirection
|
import org.mozilla.fenix.BrowserDirection
|
||||||
import org.mozilla.fenix.GleanMetrics.Awesomebar
|
import org.mozilla.fenix.GleanMetrics.Awesomebar
|
||||||
import org.mozilla.fenix.GleanMetrics.Events
|
import org.mozilla.fenix.GleanMetrics.Events
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ import mozilla.components.compose.browser.awesomebar.AwesomeBar
|
|||||||
import mozilla.components.compose.browser.awesomebar.AwesomeBarDefaults
|
import mozilla.components.compose.browser.awesomebar.AwesomeBarDefaults
|
||||||
import mozilla.components.compose.browser.awesomebar.AwesomeBarOrientation
|
import mozilla.components.compose.browser.awesomebar.AwesomeBarOrientation
|
||||||
import mozilla.components.concept.awesomebar.AwesomeBar
|
import mozilla.components.concept.awesomebar.AwesomeBar
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
|
||||||
import mozilla.components.support.ktx.android.view.hideKeyboard
|
import mozilla.components.support.ktx.android.view.hideKeyboard
|
||||||
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.GleanMetrics.BookmarksManagement
|
import org.mozilla.fenix.GleanMetrics.BookmarksManagement
|
||||||
import org.mozilla.fenix.GleanMetrics.History
|
import org.mozilla.fenix.GleanMetrics.History
|
||||||
import org.mozilla.fenix.ext.components
|
import org.mozilla.fenix.ext.components
|
||||||
|
|||||||
@@ -39,10 +39,10 @@ import mozilla.components.concept.sync.AuthType
|
|||||||
import mozilla.components.concept.sync.OAuthAccount
|
import mozilla.components.concept.sync.OAuthAccount
|
||||||
import mozilla.components.concept.sync.Profile
|
import mozilla.components.concept.sync.Profile
|
||||||
import mozilla.components.feature.addons.ui.AddonFilePicker
|
import mozilla.components.feature.addons.ui.AddonFilePicker
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
|
||||||
import mozilla.components.support.base.feature.ViewBoundFeatureWrapper
|
import mozilla.components.support.base.feature.ViewBoundFeatureWrapper
|
||||||
import mozilla.components.support.ktx.android.view.showKeyboard
|
import mozilla.components.support.ktx.android.view.showKeyboard
|
||||||
import mozilla.components.ui.widgets.withCenterAlignedButtons
|
import mozilla.components.ui.widgets.withCenterAlignedButtons
|
||||||
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.BrowserDirection
|
import org.mozilla.fenix.BrowserDirection
|
||||||
import org.mozilla.fenix.Config
|
import org.mozilla.fenix.Config
|
||||||
import org.mozilla.fenix.FeatureFlags
|
import org.mozilla.fenix.FeatureFlags
|
||||||
@@ -385,7 +385,7 @@ class SettingsFragment : PreferenceFragmentCompat() {
|
|||||||
|
|
||||||
/* Advanced preferences */
|
/* Advanced preferences */
|
||||||
resources.getString(R.string.pref_key_addons) -> {
|
resources.getString(R.string.pref_key_addons) -> {
|
||||||
Addons.openAddonsInSettings.record(mozilla.components.service.glean.private.NoExtras())
|
Addons.openAddonsInSettings.record(NoExtras())
|
||||||
SettingsFragmentDirections.actionSettingsFragmentToAddonsFragment()
|
SettingsFragmentDirections.actionSettingsFragmentToAddonsFragment()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ import androidx.core.content.pm.PackageInfoCompat
|
|||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.navigation.fragment.findNavController
|
import androidx.navigation.fragment.findNavController
|
||||||
import androidx.recyclerview.widget.DividerItemDecoration
|
import androidx.recyclerview.widget.DividerItemDecoration
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
|
||||||
import mozilla.components.support.utils.ext.getPackageInfoCompat
|
import mozilla.components.support.utils.ext.getPackageInfoCompat
|
||||||
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.BrowserDirection
|
import org.mozilla.fenix.BrowserDirection
|
||||||
import org.mozilla.fenix.BuildConfig
|
import org.mozilla.fenix.BuildConfig
|
||||||
import org.mozilla.fenix.GleanMetrics.Events
|
import org.mozilla.fenix.GleanMetrics.Events
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ import kotlinx.coroutines.Dispatchers
|
|||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import mozilla.components.concept.storage.NewCreditCardFields
|
import mozilla.components.concept.storage.NewCreditCardFields
|
||||||
import mozilla.components.concept.storage.UpdatableCreditCardFields
|
import mozilla.components.concept.storage.UpdatableCreditCardFields
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
|
||||||
import mozilla.components.service.sync.autofill.AutofillCreditCardsAddressesStorage
|
import mozilla.components.service.sync.autofill.AutofillCreditCardsAddressesStorage
|
||||||
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.GleanMetrics.CreditCards
|
import org.mozilla.fenix.GleanMetrics.CreditCards
|
||||||
import org.mozilla.fenix.settings.creditcards.CreditCardEditorFragment
|
import org.mozilla.fenix.settings.creditcards.CreditCardEditorFragment
|
||||||
import org.mozilla.fenix.settings.creditcards.interactor.CreditCardEditorInteractor
|
import org.mozilla.fenix.settings.creditcards.interactor.CreditCardEditorInteractor
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
package org.mozilla.fenix.settings.creditcards.interactor
|
package org.mozilla.fenix.settings.creditcards.interactor
|
||||||
|
|
||||||
import mozilla.components.concept.storage.CreditCard
|
import mozilla.components.concept.storage.CreditCard
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.GleanMetrics.CreditCards
|
import org.mozilla.fenix.GleanMetrics.CreditCards
|
||||||
import org.mozilla.fenix.settings.creditcards.controller.CreditCardsManagementController
|
import org.mozilla.fenix.settings.creditcards.controller.CreditCardsManagementController
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import android.text.InputType
|
|||||||
import android.widget.ImageButton
|
import android.widget.ImageButton
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import androidx.appcompat.content.res.AppCompatResources
|
import androidx.appcompat.content.res.AppCompatResources
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.GleanMetrics.Logins
|
import org.mozilla.fenix.GleanMetrics.Logins
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
package org.mozilla.fenix.settings.logins.controller
|
package org.mozilla.fenix.settings.logins.controller
|
||||||
|
|
||||||
import androidx.navigation.NavController
|
import androidx.navigation.NavController
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.BrowserDirection
|
import org.mozilla.fenix.BrowserDirection
|
||||||
import org.mozilla.fenix.GleanMetrics.Logins
|
import org.mozilla.fenix.GleanMetrics.Logins
|
||||||
import org.mozilla.fenix.settings.SupportUtils
|
import org.mozilla.fenix.settings.SupportUtils
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ import androidx.navigation.fragment.findNavController
|
|||||||
import androidx.navigation.fragment.navArgs
|
import androidx.navigation.fragment.navArgs
|
||||||
import com.google.android.material.textfield.TextInputLayout
|
import com.google.android.material.textfield.TextInputLayout
|
||||||
import mozilla.components.lib.state.ext.consumeFrom
|
import mozilla.components.lib.state.ext.consumeFrom
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
|
||||||
import mozilla.components.support.ktx.android.view.hideKeyboard
|
import mozilla.components.support.ktx.android.view.hideKeyboard
|
||||||
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.GleanMetrics.Logins
|
import org.mozilla.fenix.GleanMetrics.Logins
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
import org.mozilla.fenix.components.StoreProvider
|
import org.mozilla.fenix.components.StoreProvider
|
||||||
|
|||||||
@@ -26,8 +26,8 @@ import androidx.navigation.fragment.findNavController
|
|||||||
import androidx.navigation.fragment.navArgs
|
import androidx.navigation.fragment.navArgs
|
||||||
import com.google.android.material.snackbar.Snackbar
|
import com.google.android.material.snackbar.Snackbar
|
||||||
import mozilla.components.lib.state.ext.consumeFrom
|
import mozilla.components.lib.state.ext.consumeFrom
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
|
||||||
import mozilla.components.ui.widgets.withCenterAlignedButtons
|
import mozilla.components.ui.widgets.withCenterAlignedButtons
|
||||||
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.BrowserDirection
|
import org.mozilla.fenix.BrowserDirection
|
||||||
import org.mozilla.fenix.GleanMetrics.Logins
|
import org.mozilla.fenix.GleanMetrics.Logins
|
||||||
import org.mozilla.fenix.HomeActivity
|
import org.mozilla.fenix.HomeActivity
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import androidx.preference.PreferenceFragmentCompat
|
|||||||
import androidx.preference.SwitchPreference
|
import androidx.preference.SwitchPreference
|
||||||
import mozilla.components.feature.autofill.preference.AutofillPreference
|
import mozilla.components.feature.autofill.preference.AutofillPreference
|
||||||
import mozilla.components.service.fxa.SyncEngine
|
import mozilla.components.service.fxa.SyncEngine
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.GleanMetrics.Logins
|
import org.mozilla.fenix.GleanMetrics.Logins
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
import org.mozilla.fenix.components.accounts.FenixFxAEntryPoint
|
import org.mozilla.fenix.components.accounts.FenixFxAEntryPoint
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import mozilla.components.concept.engine.cookiehandling.CookieBannersStorage
|
|||||||
import mozilla.components.concept.engine.permission.SitePermissions
|
import mozilla.components.concept.engine.permission.SitePermissions
|
||||||
import mozilla.components.feature.session.SessionUseCases
|
import mozilla.components.feature.session.SessionUseCases
|
||||||
import mozilla.components.lib.publicsuffixlist.PublicSuffixList
|
import mozilla.components.lib.publicsuffixlist.PublicSuffixList
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.GleanMetrics.CookieBanners
|
import org.mozilla.fenix.GleanMetrics.CookieBanners
|
||||||
import org.mozilla.fenix.GleanMetrics.Pings
|
import org.mozilla.fenix.GleanMetrics.Pings
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ import kotlinx.coroutines.CoroutineScope
|
|||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import mozilla.components.lib.publicsuffixlist.PublicSuffixList
|
import mozilla.components.lib.publicsuffixlist.PublicSuffixList
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
|
||||||
import mozilla.components.support.ktx.kotlin.toShortUrl
|
import mozilla.components.support.ktx.kotlin.toShortUrl
|
||||||
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.GleanMetrics.CookieBanners
|
import org.mozilla.fenix.GleanMetrics.CookieBanners
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
import org.mozilla.fenix.databinding.ComponentCookieBannerDetailsPanelBinding
|
import org.mozilla.fenix.databinding.ComponentCookieBannerDetailsPanelBinding
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import androidx.navigation.Navigation
|
|||||||
import androidx.preference.Preference
|
import androidx.preference.Preference
|
||||||
import androidx.preference.Preference.OnPreferenceClickListener
|
import androidx.preference.Preference.OnPreferenceClickListener
|
||||||
import androidx.preference.PreferenceFragmentCompat
|
import androidx.preference.PreferenceFragmentCompat
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.Config
|
import org.mozilla.fenix.Config
|
||||||
import org.mozilla.fenix.GleanMetrics.Autoplay
|
import org.mozilla.fenix.GleanMetrics.Autoplay
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import androidx.lifecycle.lifecycleScope
|
|||||||
import androidx.navigation.fragment.findNavController
|
import androidx.navigation.fragment.findNavController
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import mozilla.components.lib.state.ext.observeAsComposableState
|
import mozilla.components.lib.state.ext.observeAsComposableState
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.BrowserDirection
|
import org.mozilla.fenix.BrowserDirection
|
||||||
import org.mozilla.fenix.GleanMetrics.Wallpapers
|
import org.mozilla.fenix.GleanMetrics.Wallpapers
|
||||||
import org.mozilla.fenix.HomeActivity
|
import org.mozilla.fenix.HomeActivity
|
||||||
|
|||||||
@@ -32,8 +32,8 @@ import mozilla.components.concept.sync.TabData
|
|||||||
import mozilla.components.feature.accounts.push.SendTabUseCases
|
import mozilla.components.feature.accounts.push.SendTabUseCases
|
||||||
import mozilla.components.feature.session.SessionUseCases
|
import mozilla.components.feature.session.SessionUseCases
|
||||||
import mozilla.components.feature.share.RecentAppsStorage
|
import mozilla.components.feature.share.RecentAppsStorage
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
|
||||||
import mozilla.components.support.ktx.kotlin.isExtensionUrl
|
import mozilla.components.support.ktx.kotlin.isExtensionUrl
|
||||||
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.GleanMetrics.Events
|
import org.mozilla.fenix.GleanMetrics.Events
|
||||||
import org.mozilla.fenix.GleanMetrics.SyncAccount
|
import org.mozilla.fenix.GleanMetrics.SyncAccount
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import mozilla.components.browser.state.selector.getNormalOrPrivateTabs
|
|||||||
import mozilla.components.browser.state.store.BrowserStore
|
import mozilla.components.browser.state.store.BrowserStore
|
||||||
import mozilla.components.concept.engine.prompt.ShareData
|
import mozilla.components.concept.engine.prompt.ShareData
|
||||||
import mozilla.components.service.fxa.manager.FxaAccountManager
|
import mozilla.components.service.fxa.manager.FxaAccountManager
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.GleanMetrics.Events
|
import org.mozilla.fenix.GleanMetrics.Events
|
||||||
import org.mozilla.fenix.GleanMetrics.TabsTray
|
import org.mozilla.fenix.GleanMetrics.TabsTray
|
||||||
import org.mozilla.fenix.components.accounts.FenixFxAEntryPoint
|
import org.mozilla.fenix.components.accounts.FenixFxAEntryPoint
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ import com.google.android.material.snackbar.Snackbar
|
|||||||
import mozilla.components.browser.state.selector.findCustomTab
|
import mozilla.components.browser.state.selector.findCustomTab
|
||||||
import mozilla.components.browser.state.selector.selectedTab
|
import mozilla.components.browser.state.selector.selectedTab
|
||||||
import mozilla.components.browser.state.store.BrowserStore
|
import mozilla.components.browser.state.store.BrowserStore
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
|
||||||
import mozilla.components.support.base.log.logger.Logger
|
import mozilla.components.support.base.log.logger.Logger
|
||||||
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.GleanMetrics.Events
|
import org.mozilla.fenix.GleanMetrics.Events
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
import org.mozilla.fenix.components.FenixSnackbar
|
import org.mozilla.fenix.components.FenixSnackbar
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ import mozilla.components.concept.engine.webextension.DisabledFlags
|
|||||||
import mozilla.components.concept.engine.webextension.Metadata
|
import mozilla.components.concept.engine.webextension.Metadata
|
||||||
import mozilla.components.concept.engine.webextension.WebExtension
|
import mozilla.components.concept.engine.webextension.WebExtension
|
||||||
import mozilla.components.feature.addons.migration.DefaultSupportedAddonsChecker
|
import mozilla.components.feature.addons.migration.DefaultSupportedAddonsChecker
|
||||||
import mozilla.components.service.glean.testing.GleanTestRule
|
|
||||||
import mozilla.components.support.test.robolectric.testContext
|
import mozilla.components.support.test.robolectric.testContext
|
||||||
import mozilla.components.support.utils.BrowsersCache
|
import mozilla.components.support.utils.BrowsersCache
|
||||||
|
import mozilla.telemetry.glean.testing.GleanTestRule
|
||||||
import org.junit.Assert.assertEquals
|
import org.junit.Assert.assertEquals
|
||||||
import org.junit.Assert.assertNotNull
|
import org.junit.Assert.assertNotNull
|
||||||
import org.junit.Assert.assertNull
|
import org.junit.Assert.assertNull
|
||||||
|
|||||||
@@ -16,11 +16,11 @@ import mozilla.components.browser.state.action.TabListAction
|
|||||||
import mozilla.components.browser.state.state.createTab
|
import mozilla.components.browser.state.state.createTab
|
||||||
import mozilla.components.browser.state.store.BrowserStore
|
import mozilla.components.browser.state.store.BrowserStore
|
||||||
import mozilla.components.feature.tab.collections.TabCollection
|
import mozilla.components.feature.tab.collections.TabCollection
|
||||||
import mozilla.components.service.glean.testing.GleanTestRule
|
|
||||||
import mozilla.components.support.test.ext.joinBlocking
|
import mozilla.components.support.test.ext.joinBlocking
|
||||||
import mozilla.components.support.test.robolectric.testContext
|
import mozilla.components.support.test.robolectric.testContext
|
||||||
import mozilla.components.support.test.rule.MainCoroutineRule
|
import mozilla.components.support.test.rule.MainCoroutineRule
|
||||||
import mozilla.components.support.test.rule.runTestOnMain
|
import mozilla.components.support.test.rule.runTestOnMain
|
||||||
|
import mozilla.telemetry.glean.testing.GleanTestRule
|
||||||
import org.junit.Assert.assertEquals
|
import org.junit.Assert.assertEquals
|
||||||
import org.junit.Assert.assertNotNull
|
import org.junit.Assert.assertNotNull
|
||||||
import org.junit.Assert.assertNull
|
import org.junit.Assert.assertNull
|
||||||
|
|||||||
@@ -7,12 +7,12 @@ package org.mozilla.fenix.components.menu
|
|||||||
import mozilla.components.browser.state.state.ReaderState
|
import mozilla.components.browser.state.state.ReaderState
|
||||||
import mozilla.components.browser.state.state.createTab
|
import mozilla.components.browser.state.state.createTab
|
||||||
import mozilla.components.service.fxa.manager.AccountState
|
import mozilla.components.service.fxa.manager.AccountState
|
||||||
import mozilla.components.service.glean.private.EventMetricType
|
|
||||||
import mozilla.components.service.glean.private.NoExtras
|
|
||||||
import mozilla.components.service.glean.testing.GleanTestRule
|
|
||||||
import mozilla.components.support.test.ext.joinBlocking
|
import mozilla.components.support.test.ext.joinBlocking
|
||||||
import mozilla.components.support.test.robolectric.testContext
|
import mozilla.components.support.test.robolectric.testContext
|
||||||
import mozilla.telemetry.glean.internal.CounterMetric
|
import mozilla.telemetry.glean.internal.CounterMetric
|
||||||
|
import mozilla.telemetry.glean.private.EventMetricType
|
||||||
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
|
import mozilla.telemetry.glean.testing.GleanTestRule
|
||||||
import org.junit.Assert.assertEquals
|
import org.junit.Assert.assertEquals
|
||||||
import org.junit.Assert.assertNotNull
|
import org.junit.Assert.assertNotNull
|
||||||
import org.junit.Assert.assertNull
|
import org.junit.Assert.assertNull
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ package org.mozilla.fenix.components.metrics
|
|||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import androidx.test.core.app.ApplicationProvider
|
import androidx.test.core.app.ApplicationProvider
|
||||||
import mozilla.components.service.glean.testing.GleanTestRule
|
|
||||||
import mozilla.components.support.test.robolectric.testContext
|
import mozilla.components.support.test.robolectric.testContext
|
||||||
|
import mozilla.telemetry.glean.testing.GleanTestRule
|
||||||
import org.junit.Assert.assertEquals
|
import org.junit.Assert.assertEquals
|
||||||
import org.junit.Assert.assertFalse
|
import org.junit.Assert.assertFalse
|
||||||
import org.junit.Assert.assertNull
|
import org.junit.Assert.assertNull
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ package org.mozilla.fenix.components.metrics
|
|||||||
import io.mockk.every
|
import io.mockk.every
|
||||||
import io.mockk.mockk
|
import io.mockk.mockk
|
||||||
import mozilla.components.browser.state.search.SearchEngine
|
import mozilla.components.browser.state.search.SearchEngine
|
||||||
import mozilla.components.service.glean.testing.GleanTestRule
|
|
||||||
import mozilla.components.support.test.robolectric.testContext
|
import mozilla.components.support.test.robolectric.testContext
|
||||||
|
import mozilla.telemetry.glean.testing.GleanTestRule
|
||||||
import org.junit.Assert.assertEquals
|
import org.junit.Assert.assertEquals
|
||||||
import org.junit.Assert.assertNotNull
|
import org.junit.Assert.assertNotNull
|
||||||
import org.junit.Assert.assertNull
|
import org.junit.Assert.assertNull
|
||||||
|
|||||||
@@ -46,12 +46,12 @@ import mozilla.components.feature.top.sites.DefaultTopSitesStorage
|
|||||||
import mozilla.components.feature.top.sites.PinnedSiteStorage
|
import mozilla.components.feature.top.sites.PinnedSiteStorage
|
||||||
import mozilla.components.feature.top.sites.TopSite
|
import mozilla.components.feature.top.sites.TopSite
|
||||||
import mozilla.components.feature.top.sites.TopSitesUseCases
|
import mozilla.components.feature.top.sites.TopSitesUseCases
|
||||||
import mozilla.components.service.glean.testing.GleanTestRule
|
|
||||||
import mozilla.components.support.base.feature.ViewBoundFeatureWrapper
|
import mozilla.components.support.base.feature.ViewBoundFeatureWrapper
|
||||||
import mozilla.components.support.test.ext.joinBlocking
|
import mozilla.components.support.test.ext.joinBlocking
|
||||||
import mozilla.components.support.test.robolectric.testContext
|
import mozilla.components.support.test.robolectric.testContext
|
||||||
import mozilla.components.support.test.rule.MainCoroutineRule
|
import mozilla.components.support.test.rule.MainCoroutineRule
|
||||||
import mozilla.components.support.test.rule.runTestOnMain
|
import mozilla.components.support.test.rule.runTestOnMain
|
||||||
|
import mozilla.telemetry.glean.testing.GleanTestRule
|
||||||
import org.junit.After
|
import org.junit.After
|
||||||
import org.junit.Assert.assertEquals
|
import org.junit.Assert.assertEquals
|
||||||
import org.junit.Assert.assertNotNull
|
import org.junit.Assert.assertNotNull
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
package org.mozilla.fenix.ext
|
package org.mozilla.fenix.ext
|
||||||
|
|
||||||
import io.mockk.mockk
|
import io.mockk.mockk
|
||||||
import mozilla.components.service.glean.config.Configuration
|
import mozilla.telemetry.glean.config.Configuration
|
||||||
import org.junit.Assert.assertEquals
|
import org.junit.Assert.assertEquals
|
||||||
import org.junit.Assert.assertNotEquals
|
import org.junit.Assert.assertNotEquals
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
|
|||||||
@@ -29,11 +29,11 @@ import mozilla.components.feature.session.SessionUseCases
|
|||||||
import mozilla.components.feature.tab.collections.TabCollection
|
import mozilla.components.feature.tab.collections.TabCollection
|
||||||
import mozilla.components.feature.tabs.TabsUseCases
|
import mozilla.components.feature.tabs.TabsUseCases
|
||||||
import mozilla.components.feature.top.sites.TopSite
|
import mozilla.components.feature.top.sites.TopSite
|
||||||
import mozilla.components.service.glean.testing.GleanTestRule
|
|
||||||
import mozilla.components.service.nimbus.messaging.Message
|
import mozilla.components.service.nimbus.messaging.Message
|
||||||
import mozilla.components.support.test.ext.joinBlocking
|
import mozilla.components.support.test.ext.joinBlocking
|
||||||
import mozilla.components.support.test.robolectric.testContext
|
import mozilla.components.support.test.robolectric.testContext
|
||||||
import mozilla.components.support.test.rule.MainCoroutineRule
|
import mozilla.components.support.test.rule.MainCoroutineRule
|
||||||
|
import mozilla.telemetry.glean.testing.GleanTestRule
|
||||||
import org.junit.Assert.assertEquals
|
import org.junit.Assert.assertEquals
|
||||||
import org.junit.Assert.assertFalse
|
import org.junit.Assert.assertFalse
|
||||||
import org.junit.Assert.assertNotNull
|
import org.junit.Assert.assertNotNull
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import io.mockk.every
|
|||||||
import io.mockk.mockk
|
import io.mockk.mockk
|
||||||
import io.mockk.verify
|
import io.mockk.verify
|
||||||
import mozilla.components.concept.engine.EngineSession
|
import mozilla.components.concept.engine.EngineSession
|
||||||
import mozilla.components.service.glean.testing.GleanTestRule
|
|
||||||
import mozilla.components.support.test.robolectric.testContext
|
import mozilla.components.support.test.robolectric.testContext
|
||||||
|
import mozilla.telemetry.glean.testing.GleanTestRule
|
||||||
import org.junit.Assert.assertFalse
|
import org.junit.Assert.assertFalse
|
||||||
import org.junit.Assert.assertNotNull
|
import org.junit.Assert.assertNotNull
|
||||||
import org.junit.Assert.assertNull
|
import org.junit.Assert.assertNull
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ import androidx.navigation.navOptions
|
|||||||
import io.mockk.Called
|
import io.mockk.Called
|
||||||
import io.mockk.mockk
|
import io.mockk.mockk
|
||||||
import io.mockk.verify
|
import io.mockk.verify
|
||||||
import mozilla.components.service.glean.testing.GleanTestRule
|
|
||||||
import mozilla.components.support.test.robolectric.testContext
|
import mozilla.components.support.test.robolectric.testContext
|
||||||
|
import mozilla.telemetry.glean.testing.GleanTestRule
|
||||||
import org.junit.Assert.assertEquals
|
import org.junit.Assert.assertEquals
|
||||||
import org.junit.Assert.assertNotNull
|
import org.junit.Assert.assertNotNull
|
||||||
import org.junit.Rule
|
import org.junit.Rule
|
||||||
|
|||||||
@@ -35,10 +35,10 @@ import mozilla.components.service.fxa.store.SyncAction
|
|||||||
import mozilla.components.service.fxa.store.SyncStatus
|
import mozilla.components.service.fxa.store.SyncStatus
|
||||||
import mozilla.components.service.fxa.store.SyncStore
|
import mozilla.components.service.fxa.store.SyncStore
|
||||||
import mozilla.components.service.fxa.sync.SyncReason
|
import mozilla.components.service.fxa.sync.SyncReason
|
||||||
import mozilla.components.service.glean.testing.GleanTestRule
|
|
||||||
import mozilla.components.support.test.libstate.ext.waitUntilIdle
|
import mozilla.components.support.test.libstate.ext.waitUntilIdle
|
||||||
import mozilla.components.support.test.robolectric.testContext
|
import mozilla.components.support.test.robolectric.testContext
|
||||||
import mozilla.telemetry.glean.internal.ErrorType
|
import mozilla.telemetry.glean.internal.ErrorType
|
||||||
|
import mozilla.telemetry.glean.testing.GleanTestRule
|
||||||
import org.junit.Assert.assertEquals
|
import org.junit.Assert.assertEquals
|
||||||
import org.junit.Assert.assertNotNull
|
import org.junit.Assert.assertNotNull
|
||||||
import org.junit.Assert.assertNull
|
import org.junit.Assert.assertNull
|
||||||
|
|||||||
@@ -22,10 +22,10 @@ import mozilla.components.concept.storage.HistoryMetadata
|
|||||||
import mozilla.components.concept.storage.HistoryMetadataKey
|
import mozilla.components.concept.storage.HistoryMetadataKey
|
||||||
import mozilla.components.concept.storage.HistoryMetadataStorage
|
import mozilla.components.concept.storage.HistoryMetadataStorage
|
||||||
import mozilla.components.feature.tabs.TabsUseCases.SelectOrAddUseCase
|
import mozilla.components.feature.tabs.TabsUseCases.SelectOrAddUseCase
|
||||||
import mozilla.components.service.glean.testing.GleanTestRule
|
|
||||||
import mozilla.components.support.test.robolectric.testContext
|
import mozilla.components.support.test.robolectric.testContext
|
||||||
import mozilla.components.support.test.rule.MainCoroutineRule
|
import mozilla.components.support.test.rule.MainCoroutineRule
|
||||||
import mozilla.components.support.test.rule.runTestOnMain
|
import mozilla.components.support.test.rule.runTestOnMain
|
||||||
|
import mozilla.telemetry.glean.testing.GleanTestRule
|
||||||
import org.junit.Assert.assertNotNull
|
import org.junit.Assert.assertNotNull
|
||||||
import org.junit.Assert.assertNull
|
import org.junit.Assert.assertNull
|
||||||
import org.junit.Before
|
import org.junit.Before
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ import mozilla.components.browser.state.search.SearchEngine
|
|||||||
import mozilla.components.browser.state.state.BrowserState
|
import mozilla.components.browser.state.state.BrowserState
|
||||||
import mozilla.components.browser.state.state.SearchState
|
import mozilla.components.browser.state.state.SearchState
|
||||||
import mozilla.components.browser.state.store.BrowserStore
|
import mozilla.components.browser.state.store.BrowserStore
|
||||||
import mozilla.components.service.glean.testing.GleanTestRule
|
|
||||||
import mozilla.components.support.test.robolectric.testContext
|
import mozilla.components.support.test.robolectric.testContext
|
||||||
|
import mozilla.telemetry.glean.testing.GleanTestRule
|
||||||
import org.junit.Assert.assertEquals
|
import org.junit.Assert.assertEquals
|
||||||
import org.junit.Assert.assertNotNull
|
import org.junit.Assert.assertNotNull
|
||||||
import org.junit.Assert.assertNull
|
import org.junit.Assert.assertNull
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
|
|
||||||
package org.mozilla.fenix.library.history.state
|
package org.mozilla.fenix.library.history.state
|
||||||
|
|
||||||
import mozilla.components.service.glean.testing.GleanTestRule
|
|
||||||
import mozilla.components.support.test.ext.joinBlocking
|
import mozilla.components.support.test.ext.joinBlocking
|
||||||
import mozilla.components.support.test.robolectric.testContext
|
import mozilla.components.support.test.robolectric.testContext
|
||||||
|
import mozilla.telemetry.glean.testing.GleanTestRule
|
||||||
import org.junit.Assert.assertNotNull
|
import org.junit.Assert.assertNotNull
|
||||||
import org.junit.Assert.assertNull
|
import org.junit.Assert.assertNull
|
||||||
import org.junit.Rule
|
import org.junit.Rule
|
||||||
|
|||||||
@@ -17,10 +17,10 @@ import mozilla.components.browser.storage.sync.PlacesHistoryStorage
|
|||||||
import mozilla.components.concept.engine.prompt.ShareData
|
import mozilla.components.concept.engine.prompt.ShareData
|
||||||
import mozilla.components.concept.storage.HistoryMetadataKey
|
import mozilla.components.concept.storage.HistoryMetadataKey
|
||||||
import mozilla.components.feature.tabs.TabsUseCases
|
import mozilla.components.feature.tabs.TabsUseCases
|
||||||
import mozilla.components.service.glean.testing.GleanTestRule
|
|
||||||
import mozilla.components.support.test.robolectric.testContext
|
import mozilla.components.support.test.robolectric.testContext
|
||||||
import mozilla.components.support.test.rule.MainCoroutineRule
|
import mozilla.components.support.test.rule.MainCoroutineRule
|
||||||
import mozilla.components.support.test.rule.runTestOnMain
|
import mozilla.components.support.test.rule.runTestOnMain
|
||||||
|
import mozilla.telemetry.glean.testing.GleanTestRule
|
||||||
import org.junit.Assert.assertEquals
|
import org.junit.Assert.assertEquals
|
||||||
import org.junit.Assert.assertFalse
|
import org.junit.Assert.assertFalse
|
||||||
import org.junit.Assert.assertNotNull
|
import org.junit.Assert.assertNotNull
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import io.mockk.mockk
|
|||||||
import io.mockk.verifySequence
|
import io.mockk.verifySequence
|
||||||
import mozilla.components.browser.state.action.AppLifecycleAction
|
import mozilla.components.browser.state.action.AppLifecycleAction
|
||||||
import mozilla.components.browser.state.store.BrowserStore
|
import mozilla.components.browser.state.store.BrowserStore
|
||||||
import mozilla.components.service.glean.testing.GleanTestRule
|
import mozilla.telemetry.glean.testing.GleanTestRule
|
||||||
import org.junit.Rule
|
import org.junit.Rule
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.junit.runner.RunWith
|
import org.junit.runner.RunWith
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import androidx.core.content.getSystemService
|
|||||||
import io.mockk.MockKAnnotations
|
import io.mockk.MockKAnnotations
|
||||||
import io.mockk.every
|
import io.mockk.every
|
||||||
import io.mockk.impl.annotations.RelaxedMockK
|
import io.mockk.impl.annotations.RelaxedMockK
|
||||||
import mozilla.components.service.glean.testing.GleanTestRule
|
|
||||||
import mozilla.components.support.test.robolectric.testContext
|
import mozilla.components.support.test.robolectric.testContext
|
||||||
|
import mozilla.telemetry.glean.testing.GleanTestRule
|
||||||
import org.junit.Assert.assertEquals
|
import org.junit.Assert.assertEquals
|
||||||
import org.junit.Assert.assertNotNull
|
import org.junit.Assert.assertNotNull
|
||||||
import org.junit.Before
|
import org.junit.Before
|
||||||
|
|||||||
@@ -26,10 +26,10 @@ import mozilla.components.browser.state.state.BrowserState
|
|||||||
import mozilla.components.browser.state.store.BrowserStore
|
import mozilla.components.browser.state.store.BrowserStore
|
||||||
import mozilla.components.concept.engine.EngineSession
|
import mozilla.components.concept.engine.EngineSession
|
||||||
import mozilla.components.feature.tabs.TabsUseCases
|
import mozilla.components.feature.tabs.TabsUseCases
|
||||||
import mozilla.components.service.glean.testing.GleanTestRule
|
|
||||||
import mozilla.components.support.test.libstate.ext.waitUntilIdle
|
import mozilla.components.support.test.libstate.ext.waitUntilIdle
|
||||||
import mozilla.components.support.test.middleware.CaptureActionsMiddleware
|
import mozilla.components.support.test.middleware.CaptureActionsMiddleware
|
||||||
import mozilla.components.support.test.robolectric.testContext
|
import mozilla.components.support.test.robolectric.testContext
|
||||||
|
import mozilla.telemetry.glean.testing.GleanTestRule
|
||||||
import org.junit.After
|
import org.junit.After
|
||||||
import org.junit.Assert.assertEquals
|
import org.junit.Assert.assertEquals
|
||||||
import org.junit.Assert.assertFalse
|
import org.junit.Assert.assertFalse
|
||||||
|
|||||||
@@ -22,10 +22,10 @@ import io.mockk.verify
|
|||||||
import mozilla.components.browser.state.search.SearchEngine
|
import mozilla.components.browser.state.search.SearchEngine
|
||||||
import mozilla.components.browser.state.search.SearchEngine.Type.BUNDLED
|
import mozilla.components.browser.state.search.SearchEngine.Type.BUNDLED
|
||||||
import mozilla.components.concept.menu.Orientation
|
import mozilla.components.concept.menu.Orientation
|
||||||
import mozilla.components.service.glean.testing.GleanTestRule
|
|
||||||
import mozilla.components.support.test.libstate.ext.waitUntilIdle
|
import mozilla.components.support.test.libstate.ext.waitUntilIdle
|
||||||
import mozilla.components.support.test.robolectric.testContext
|
import mozilla.components.support.test.robolectric.testContext
|
||||||
import mozilla.components.support.test.rule.MainCoroutineRule
|
import mozilla.components.support.test.rule.MainCoroutineRule
|
||||||
|
import mozilla.telemetry.glean.testing.GleanTestRule
|
||||||
import org.junit.Assert.assertNotNull
|
import org.junit.Assert.assertNotNull
|
||||||
import org.junit.Assert.assertNull
|
import org.junit.Assert.assertNull
|
||||||
import org.junit.Assert.assertTrue
|
import org.junit.Assert.assertTrue
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ import kotlinx.coroutines.runBlocking
|
|||||||
import mozilla.components.browser.state.search.RegionState
|
import mozilla.components.browser.state.search.RegionState
|
||||||
import mozilla.components.concept.storage.Address
|
import mozilla.components.concept.storage.Address
|
||||||
import mozilla.components.concept.storage.UpdatableAddressFields
|
import mozilla.components.concept.storage.UpdatableAddressFields
|
||||||
import mozilla.components.service.glean.testing.GleanTestRule
|
|
||||||
import mozilla.components.support.test.robolectric.testContext
|
import mozilla.components.support.test.robolectric.testContext
|
||||||
|
import mozilla.telemetry.glean.testing.GleanTestRule
|
||||||
import org.junit.Assert.assertEquals
|
import org.junit.Assert.assertEquals
|
||||||
import org.junit.Assert.assertNotEquals
|
import org.junit.Assert.assertNotEquals
|
||||||
import org.junit.Assert.assertNotNull
|
import org.junit.Assert.assertNotNull
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ package org.mozilla.fenix.settings.logins
|
|||||||
import androidx.navigation.NavController
|
import androidx.navigation.NavController
|
||||||
import io.mockk.mockk
|
import io.mockk.mockk
|
||||||
import io.mockk.verifyAll
|
import io.mockk.verifyAll
|
||||||
import mozilla.components.service.glean.testing.GleanTestRule
|
|
||||||
import mozilla.components.support.test.robolectric.testContext
|
import mozilla.components.support.test.robolectric.testContext
|
||||||
|
import mozilla.telemetry.glean.testing.GleanTestRule
|
||||||
import org.junit.Assert.assertEquals
|
import org.junit.Assert.assertEquals
|
||||||
import org.junit.Assert.assertNotNull
|
import org.junit.Assert.assertNotNull
|
||||||
import org.junit.Assert.assertNull
|
import org.junit.Assert.assertNull
|
||||||
|
|||||||
@@ -25,10 +25,10 @@ import mozilla.components.concept.engine.permission.SitePermissions
|
|||||||
import mozilla.components.concept.engine.permission.SitePermissions.Status.NO_DECISION
|
import mozilla.components.concept.engine.permission.SitePermissions.Status.NO_DECISION
|
||||||
import mozilla.components.feature.session.SessionUseCases
|
import mozilla.components.feature.session.SessionUseCases
|
||||||
import mozilla.components.feature.session.TrackingProtectionUseCases
|
import mozilla.components.feature.session.TrackingProtectionUseCases
|
||||||
import mozilla.components.service.glean.testing.GleanTestRule
|
|
||||||
import mozilla.components.support.test.robolectric.testContext
|
import mozilla.components.support.test.robolectric.testContext
|
||||||
import mozilla.components.support.test.rule.MainCoroutineRule
|
import mozilla.components.support.test.rule.MainCoroutineRule
|
||||||
import mozilla.components.support.test.rule.runTestOnMain
|
import mozilla.components.support.test.rule.runTestOnMain
|
||||||
|
import mozilla.telemetry.glean.testing.GleanTestRule
|
||||||
import org.junit.Assert.assertArrayEquals
|
import org.junit.Assert.assertArrayEquals
|
||||||
import org.junit.Assert.assertEquals
|
import org.junit.Assert.assertEquals
|
||||||
import org.junit.Assert.assertNotNull
|
import org.junit.Assert.assertNotNull
|
||||||
|
|||||||
@@ -31,10 +31,10 @@ import mozilla.components.concept.engine.permission.SitePermissions
|
|||||||
import mozilla.components.feature.session.SessionUseCases
|
import mozilla.components.feature.session.SessionUseCases
|
||||||
import mozilla.components.feature.session.TrackingProtectionUseCases
|
import mozilla.components.feature.session.TrackingProtectionUseCases
|
||||||
import mozilla.components.lib.publicsuffixlist.PublicSuffixList
|
import mozilla.components.lib.publicsuffixlist.PublicSuffixList
|
||||||
import mozilla.components.service.glean.testing.GleanTestRule
|
|
||||||
import mozilla.components.support.test.robolectric.testContext
|
import mozilla.components.support.test.robolectric.testContext
|
||||||
import mozilla.components.support.test.rule.MainCoroutineRule
|
import mozilla.components.support.test.rule.MainCoroutineRule
|
||||||
import mozilla.components.support.test.rule.runTestOnMain
|
import mozilla.components.support.test.rule.runTestOnMain
|
||||||
|
import mozilla.telemetry.glean.testing.GleanTestRule
|
||||||
import org.junit.Assert.assertEquals
|
import org.junit.Assert.assertEquals
|
||||||
import org.junit.Assert.assertNotNull
|
import org.junit.Assert.assertNotNull
|
||||||
import org.junit.Assert.assertNull
|
import org.junit.Assert.assertNull
|
||||||
|
|||||||
@@ -14,11 +14,11 @@ import mozilla.components.browser.state.state.BrowserState
|
|||||||
import mozilla.components.browser.state.state.createTab
|
import mozilla.components.browser.state.state.createTab
|
||||||
import mozilla.components.browser.state.store.BrowserStore
|
import mozilla.components.browser.state.store.BrowserStore
|
||||||
import mozilla.components.concept.engine.EngineSession
|
import mozilla.components.concept.engine.EngineSession
|
||||||
import mozilla.components.service.glean.testing.GleanTestRule
|
|
||||||
import mozilla.components.support.test.libstate.ext.waitUntilIdle
|
import mozilla.components.support.test.libstate.ext.waitUntilIdle
|
||||||
import mozilla.components.support.test.robolectric.testContext
|
import mozilla.components.support.test.robolectric.testContext
|
||||||
import mozilla.components.support.test.rule.MainCoroutineRule
|
import mozilla.components.support.test.rule.MainCoroutineRule
|
||||||
import mozilla.components.support.test.rule.runTestOnMain
|
import mozilla.components.support.test.rule.runTestOnMain
|
||||||
|
import mozilla.telemetry.glean.testing.GleanTestRule
|
||||||
import org.junit.Assert.assertEquals
|
import org.junit.Assert.assertEquals
|
||||||
import org.junit.Assert.assertNotNull
|
import org.junit.Assert.assertNotNull
|
||||||
import org.junit.Before
|
import org.junit.Before
|
||||||
|
|||||||
@@ -26,10 +26,10 @@ import mozilla.components.concept.sync.TabData
|
|||||||
import mozilla.components.feature.accounts.push.SendTabUseCases
|
import mozilla.components.feature.accounts.push.SendTabUseCases
|
||||||
import mozilla.components.feature.session.SessionUseCases
|
import mozilla.components.feature.session.SessionUseCases
|
||||||
import mozilla.components.feature.share.RecentAppsStorage
|
import mozilla.components.feature.share.RecentAppsStorage
|
||||||
import mozilla.components.service.glean.testing.GleanTestRule
|
|
||||||
import mozilla.components.support.test.robolectric.testContext
|
import mozilla.components.support.test.robolectric.testContext
|
||||||
import mozilla.components.support.test.rule.MainCoroutineRule
|
import mozilla.components.support.test.rule.MainCoroutineRule
|
||||||
import mozilla.components.support.test.rule.runTestOnMain
|
import mozilla.components.support.test.rule.runTestOnMain
|
||||||
|
import mozilla.telemetry.glean.testing.GleanTestRule
|
||||||
import org.junit.Assert.assertEquals
|
import org.junit.Assert.assertEquals
|
||||||
import org.junit.Assert.assertNotNull
|
import org.junit.Assert.assertNotNull
|
||||||
import org.junit.Assert.assertNull
|
import org.junit.Assert.assertNull
|
||||||
|
|||||||
@@ -14,9 +14,9 @@ import mozilla.components.browser.state.store.BrowserStore
|
|||||||
import mozilla.components.concept.engine.EngineSession
|
import mozilla.components.concept.engine.EngineSession
|
||||||
import mozilla.components.concept.engine.shopping.ProductAnalysis
|
import mozilla.components.concept.engine.shopping.ProductAnalysis
|
||||||
import mozilla.components.concept.engine.shopping.ProductRecommendation
|
import mozilla.components.concept.engine.shopping.ProductRecommendation
|
||||||
import mozilla.components.service.glean.testing.GleanTestRule
|
|
||||||
import mozilla.components.support.test.robolectric.testContext
|
import mozilla.components.support.test.robolectric.testContext
|
||||||
import mozilla.components.support.test.rule.MainCoroutineRule
|
import mozilla.components.support.test.rule.MainCoroutineRule
|
||||||
|
import mozilla.telemetry.glean.testing.GleanTestRule
|
||||||
import org.junit.Assert.assertEquals
|
import org.junit.Assert.assertEquals
|
||||||
import org.junit.Assert.assertNotNull
|
import org.junit.Assert.assertNotNull
|
||||||
import org.junit.Assert.assertNull
|
import org.junit.Assert.assertNull
|
||||||
|
|||||||
@@ -8,11 +8,11 @@ import kotlinx.coroutines.test.runTest
|
|||||||
import mozilla.components.browser.state.state.BrowserState
|
import mozilla.components.browser.state.state.BrowserState
|
||||||
import mozilla.components.browser.state.state.createTab
|
import mozilla.components.browser.state.state.createTab
|
||||||
import mozilla.components.browser.state.store.BrowserStore
|
import mozilla.components.browser.state.store.BrowserStore
|
||||||
import mozilla.components.service.glean.testing.GleanTestRule
|
|
||||||
import mozilla.components.support.test.ext.joinBlocking
|
import mozilla.components.support.test.ext.joinBlocking
|
||||||
import mozilla.components.support.test.libstate.ext.waitUntilIdle
|
import mozilla.components.support.test.libstate.ext.waitUntilIdle
|
||||||
import mozilla.components.support.test.robolectric.testContext
|
import mozilla.components.support.test.robolectric.testContext
|
||||||
import mozilla.components.support.test.rule.MainCoroutineRule
|
import mozilla.components.support.test.rule.MainCoroutineRule
|
||||||
|
import mozilla.telemetry.glean.testing.GleanTestRule
|
||||||
import org.junit.Assert.assertEquals
|
import org.junit.Assert.assertEquals
|
||||||
import org.junit.Assert.assertNotNull
|
import org.junit.Assert.assertNotNull
|
||||||
import org.junit.Assert.assertNull
|
import org.junit.Assert.assertNull
|
||||||
|
|||||||
@@ -33,13 +33,13 @@ import mozilla.components.browser.storage.sync.TabEntry
|
|||||||
import mozilla.components.concept.base.profiler.Profiler
|
import mozilla.components.concept.base.profiler.Profiler
|
||||||
import mozilla.components.feature.accounts.push.CloseTabsUseCases
|
import mozilla.components.feature.accounts.push.CloseTabsUseCases
|
||||||
import mozilla.components.feature.tabs.TabsUseCases
|
import mozilla.components.feature.tabs.TabsUseCases
|
||||||
import mozilla.components.service.glean.testing.GleanTestRule
|
|
||||||
import mozilla.components.support.test.ext.joinBlocking
|
import mozilla.components.support.test.ext.joinBlocking
|
||||||
import mozilla.components.support.test.libstate.ext.waitUntilIdle
|
import mozilla.components.support.test.libstate.ext.waitUntilIdle
|
||||||
import mozilla.components.support.test.middleware.CaptureActionsMiddleware
|
import mozilla.components.support.test.middleware.CaptureActionsMiddleware
|
||||||
import mozilla.components.support.test.robolectric.testContext
|
import mozilla.components.support.test.robolectric.testContext
|
||||||
import mozilla.components.support.test.rule.MainCoroutineRule
|
import mozilla.components.support.test.rule.MainCoroutineRule
|
||||||
import mozilla.components.support.test.rule.runTestOnMain
|
import mozilla.components.support.test.rule.runTestOnMain
|
||||||
|
import mozilla.telemetry.glean.testing.GleanTestRule
|
||||||
import org.junit.Assert.assertEquals
|
import org.junit.Assert.assertEquals
|
||||||
import org.junit.Assert.assertFalse
|
import org.junit.Assert.assertFalse
|
||||||
import org.junit.Assert.assertNotEquals
|
import org.junit.Assert.assertNotEquals
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ import mozilla.components.browser.state.state.TabSessionState
|
|||||||
import mozilla.components.browser.state.state.content.DownloadState
|
import mozilla.components.browser.state.state.content.DownloadState
|
||||||
import mozilla.components.browser.state.store.BrowserStore
|
import mozilla.components.browser.state.store.BrowserStore
|
||||||
import mozilla.components.service.fxa.manager.FxaAccountManager
|
import mozilla.components.service.fxa.manager.FxaAccountManager
|
||||||
import mozilla.components.service.glean.testing.GleanTestRule
|
|
||||||
import mozilla.components.support.test.robolectric.testContext
|
import mozilla.components.support.test.robolectric.testContext
|
||||||
import mozilla.components.support.test.rule.MainCoroutineRule
|
import mozilla.components.support.test.rule.MainCoroutineRule
|
||||||
|
import mozilla.telemetry.glean.testing.GleanTestRule
|
||||||
import org.junit.Assert.assertNotNull
|
import org.junit.Assert.assertNotNull
|
||||||
import org.junit.Assert.assertNull
|
import org.junit.Assert.assertNull
|
||||||
import org.junit.Assert.assertTrue
|
import org.junit.Assert.assertTrue
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ import io.mockk.verify
|
|||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
import mozilla.components.browser.menu.BrowserMenu
|
import mozilla.components.browser.menu.BrowserMenu
|
||||||
import mozilla.components.browser.state.store.BrowserStore
|
import mozilla.components.browser.state.store.BrowserStore
|
||||||
import mozilla.components.service.glean.testing.GleanTestRule
|
|
||||||
import mozilla.components.support.test.robolectric.testContext
|
import mozilla.components.support.test.robolectric.testContext
|
||||||
|
import mozilla.telemetry.glean.testing.GleanTestRule
|
||||||
import org.junit.Assert.assertEquals
|
import org.junit.Assert.assertEquals
|
||||||
import org.junit.Assert.assertFalse
|
import org.junit.Assert.assertFalse
|
||||||
import org.junit.Assert.assertNotNull
|
import org.junit.Assert.assertNotNull
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user