diff options
Diffstat (limited to 'app/src/main/kotlin/com')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt | 18 | ||||
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/utils/BuildUtils.kt | 4 |
2 files changed, 11 insertions, 11 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt b/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt index 758f719f..38d0dd5c 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt @@ -135,19 +135,19 @@ class FrostApp : Application(), KoinComponent { val config = Configuration("83cf680ed01a6fda10fe497d1c0962bb").apply { appVersion = version.versionName releaseStage = BuildUtils.getStage(BuildConfig.BUILD_TYPE) - notifyReleaseStages = BuildUtils.getAllStages() - autoCaptureSessions = prefs.analytics - enableExceptionHandler = prefs.analytics + enabledReleaseStages = BuildUtils.getAllStages() + autoTrackSessions = prefs.analytics + autoDetectErrors = prefs.analytics } - Bugsnag.init(this, config) + Bugsnag.start(this, config) L.hasAnalytics = { prefs.analytics } - Bugsnag.setUserId(prefs.frostId) - Bugsnag.addToTab("Build", "Application", BuildConfig.APPLICATION_ID) - Bugsnag.addToTab("Build", "Version", BuildConfig.VERSION_NAME) + Bugsnag.setUser(prefs.frostId, null, null) + Bugsnag.addMetadata("Build", "Application", BuildConfig.APPLICATION_ID) + Bugsnag.addMetadata("Build", "Version", BuildConfig.VERSION_NAME) - Bugsnag.beforeNotify { error -> + Bugsnag.addOnError { event -> when { - error.exception.stackTrace.any { it.className.contains("XposedBridge") } -> false + event.originalError?.stackTrace?.any { it.className.contains("XposedBridge") } == true -> false else -> true } } diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/BuildUtils.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/BuildUtils.kt index 65ef3056..d922ff54 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/utils/BuildUtils.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/BuildUtils.kt @@ -33,8 +33,8 @@ object BuildUtils { return Data("v${result[1]}", result[2]) } - fun getAllStages(): Array<String> = - arrayOf(BUILD_PRODUCTION, BUILD_TEST, BUILD_GITHUB, BUILD_RELEASE, BUILD_UNNAMED) + fun getAllStages(): Set<String> = + setOf(BUILD_PRODUCTION, BUILD_TEST, BUILD_GITHUB, BUILD_RELEASE, BUILD_UNNAMED) fun getStage(build: String): String = build.takeIf { it in getAllStages() } ?: BUILD_UNNAMED } |