|
|
@ -32,7 +32,7 @@ class Analytics(
|
|
|
|
private val context: Context
|
|
|
|
private val context: Context
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
val crashReporter: CrashReporter by lazy {
|
|
|
|
val crashReporter: CrashReporter by lazy {
|
|
|
|
var services = listOf<CrashReporterService>()
|
|
|
|
val services = mutableListOf<CrashReporterService>()
|
|
|
|
|
|
|
|
|
|
|
|
if (!BuildConfig.SENTRY_TOKEN.isNullOrEmpty()) {
|
|
|
|
if (!BuildConfig.SENTRY_TOKEN.isNullOrEmpty()) {
|
|
|
|
val sentryService = SentryService(
|
|
|
|
val sentryService = SentryService(
|
|
|
@ -42,11 +42,13 @@ class Analytics(
|
|
|
|
sendEventForNativeCrashes = true
|
|
|
|
sendEventForNativeCrashes = true
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
services += sentryService
|
|
|
|
services.add(sentryService)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
val socorroService = MozillaSocorroService(context, context.getString(R.string.app_name))
|
|
|
|
// The name "Fenix" here matches the product name on Socorro and is unrelated to the actual app name:
|
|
|
|
services += socorroService
|
|
|
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=1523284
|
|
|
|
|
|
|
|
val socorroService = MozillaSocorroService(context, appName = "Fenix")
|
|
|
|
|
|
|
|
services.add(socorroService)
|
|
|
|
|
|
|
|
|
|
|
|
val intent = Intent(context, HomeActivity::class.java).apply {
|
|
|
|
val intent = Intent(context, HomeActivity::class.java).apply {
|
|
|
|
flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP
|
|
|
|
flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP
|
|
|
|