Skip to content
GitLab
About GitLab
GitLab: the DevOps platform
Explore GitLab
Install GitLab
How GitLab compares
Get started
GitLab docs
GitLab Learn
Pricing
Talk to an expert
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Projects
Groups
Snippets
Sign up now
Login
Sign in / Register
Toggle navigation
Menu
Open sidebar
PublicAndroidApps
Nebulo
Commits
8b9217ec
Commit
8b9217ec
authored
Dec 01, 2019
by
Daniel Wolf
Browse files
Run the whole block async
parent
9a5b16f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/com/frostnerd/smokescreen/SmokeScreen.kt
View file @
8b9217ec
...
...
@@ -96,12 +96,13 @@ class SmokeScreen : Application() {
fun
initSentry
(
forceStatus
:
Status
=
Status
.
NONE
)
{
if
(!
BuildConfig
.
DEBUG
&&
BuildConfig
.
SENTRY_DSN
!=
"dummy"
)
{
val
enabledType
=
getPreferences
().
crashreportingType
if
(
forceStatus
!=
Status
.
DATASAVING
&&
(
enabledType
==
Crashreporting
.
FULL
||
forceStatus
==
Status
.
ENABLED
))
{
// Enable Sentry in full mode
// This passes some device-related data, but nothing which allows user actions to be tracked across the app
// Info: Some data is attached by the AndroidEventBuilderHelper class, which is present by default
GlobalScope
.
launch
(
Dispatchers
.
IO
)
{
GlobalScope
.
launch
(
Dispatchers
.
IO
)
{
val
enabledType
=
getPreferences
().
crashreportingType
if
(
forceStatus
!=
Status
.
DATASAVING
&&
(
enabledType
==
Crashreporting
.
FULL
||
forceStatus
==
Status
.
ENABLED
))
{
// Enable Sentry in full mode
// This passes some device-related data, but nothing which allows user actions to be tracked across the app
// Info: Some data is attached by the AndroidEventBuilderHelper class, which is present by default
Sentry
.
init
(
BuildConfig
.
SENTRY_DSN
,
AndroidSentryClientFactory
(
this
@SmokeScreen
)
...
...
@@ -128,17 +129,16 @@ class SmokeScreen : Application() {
addTag
(
"app.fromCi"
,
BuildConfig
.
FROM_CI
.
toString
())
addTag
(
"app.commit"
,
BuildConfig
.
COMMIT_HASH
)
}
}
}
else
if
(
enabledType
==
Crashreporting
.
MINIMAL
||
forceStatus
==
Status
.
DATASAVING
){
// Inits Sentry in datasaving mode
// Only data absolutely necessary is transmitted (Android version, app version).
// Only crashes will be reported, no regular events.
GlobalScope
.
launch
(
Dispatchers
.
IO
)
{
}
else
if
(
enabledType
==
Crashreporting
.
MINIMAL
||
forceStatus
==
Status
.
DATASAVING
)
{
// Inits Sentry in datasaving mode
// Only data absolutely necessary is transmitted (Android version, app version).
// Only crashes will be reported, no regular events.
Sentry
.
init
(
BuildConfig
.
SENTRY_DSN
,
AndroidSentryClientFactory
(
this
@SmokeScreen
)
)
Sentry
.
getContext
().
user
=
User
(
"anon-"
+
BuildConfig
.
VERSION_CODE
,
null
,
null
,
null
)
Sentry
.
getContext
().
user
=
User
(
"anon-"
+
BuildConfig
.
VERSION_CODE
,
null
,
null
,
null
)
Sentry
.
getStoredClient
().
apply
{
addTag
(
"richdata"
,
"false"
)
addTag
(
"dist"
,
BuildConfig
.
VERSION_CODE
.
toString
())
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment