Commit c10783ec authored by Daniel Wolf's avatar Daniel Wolf
Browse files

Always disable Sentry in fdroidofficial builds

parent f37be8f0
......@@ -21,6 +21,7 @@ android {
buildConfigField("String", "COMMIT_HASH", '"' + getGitCommitHash() + '"')
buildConfigField("String", "SENTRY_DSN", '"' + sentryDSN+ '"') // A valid Sentry DSN, or "dummy"
buildConfigField("String", "SENTRY_DSN_CONFIGSERVER", '"' + sentryConfigServer + '"') // A host which returns a valid Sentry DSN on GET, or "dummy". If both are dummy Sentry is disabled.
buildConfigField("Boolean", "SENTRY_ENABLED", 'true')
buildConfigField("Boolean", "SHOW_DOQ", 'false')
buildConfigField("Boolean", "SHOW_INTRO", 'false')
buildConfigField("Boolean", "IN_APP_UPDATES", "false")
......@@ -91,6 +92,7 @@ android {
dimension "releaseChannel"
versionNameSuffix "-adblock"
versionCode 80
buildConfigField("Boolean", "SENTRY_ENABLED", 'false')
}
fdroid {
matchingFallbacks = ['default']
......
......@@ -259,7 +259,7 @@ class SmokeScreen : Application() {
}
private fun getSentryDSN(then:(dsn:String, enableType:Crashreporting) -> Unit) {
if(BuildConfig.DEBUG) return
if(BuildConfig.DEBUG or !BuildConfig.SENTRY_ENABLED) return
try {
val primaryDSN = BuildConfig.SENTRY_DSN
val configServer = BuildConfig.SENTRY_DSN_CONFIGSERVER
......
......@@ -216,7 +216,7 @@ class MainActivity : NavigationDrawerActivity() {
}
@Suppress("ConstantConditionIf")
if(!BuildConfig.DEBUG && BuildConfig.SENTRY_DSN == "dummy") {
if(!BuildConfig.DEBUG && BuildConfig.SENTRY_DSN == "dummy" && !BuildConfig.SENTRY_ENABLED) {
Toast.makeText(this, "Warning, Sentry DSN is not valid", Toast.LENGTH_LONG).show()
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment