Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Commit

Permalink
Adds build settings back
Browse files Browse the repository at this point in the history
  • Loading branch information
sblatz committed Mar 20, 2019
1 parent adcaa1e commit 1488157
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 7 additions & 0 deletions app/src/main/java/org/mozilla/fenix/FenixApplication.kt
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ open class FenixApplication : Application() {
}

private fun setupCrashReporting() {
@Suppress("ConstantConditionIf")
if (!BuildConfig.CRASH_REPORTING || BuildConfig.BUILD_TYPE != "release") {
// Only enable crash reporting if this is a release build and if crash reporting was explicitly enabled
// via a Gradle command line flag.
return
}

components
.analytics
.crashReporter
Expand Down
7 changes: 1 addition & 6 deletions app/src/main/java/org/mozilla/fenix/components/Analytics.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,10 @@ import org.mozilla.geckoview.BuildConfig.MOZ_APP_VERSION
class Analytics(
private val context: Context
) {

val crashReporter: CrashReporter by lazy {
val sentryService = SentryService(
context,
SENTRY_TOKEN,
BuildConfig.SENTRY_TOKEN,
tags = mapOf("geckoview" to "$MOZ_APP_VERSION-$MOZ_APP_BUILDID"),
sendEventForNativeCrashes = true
)
Expand Down Expand Up @@ -70,8 +69,4 @@ class Analytics(
isTelemetryEnabled = { Settings.getInstance(context).isTelemetryEnabled }
)
}

companion object {
val SENTRY_TOKEN = "https://718d381780b54062a571b990e1cecd07@sentry.prod.mozaws.net/368"
}
}

0 comments on commit 1488157

Please sign in to comment.