-
Notifications
You must be signed in to change notification settings - Fork 498
Fix booster notification background trigger (EXPOSUREAPP-11804) #4838
Fix booster notification background trigger (EXPOSUREAPP-11804) #4838
Conversation
return PeriodicWorkRequestBuilder<CCLConfigurationUpdateWorker>( | ||
repeatInterval = 24, | ||
repeatIntervalTimeUnit = TimeUnit.HOURS | ||
).setConstraints(constraints).build() | ||
).setInitialDelay( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not related to the bug, but I added a 1 minute delay for the worker so that the app and the worker won't both update the config after app start at the same time.
@@ -48,14 +47,13 @@ class CCLConfigurationUpdateScheduler @Inject constructor( | |||
} | |||
|
|||
private fun buildWorkRequest(): PeriodicWorkRequest { | |||
val constraints = Constraints.Builder() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't only run the worker when we have network connection, since the dccwallet recalculation should run daily even if we can't get the config from the network.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…-background-trigger
Kudos, SonarCloud Quality Gate passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR fixes the issue that the booster notifications are not triggered by our background worker.
Because of a copy-paste mistake of mine (in
WorkerBinder.kt
), the background worker did actually never run...How to test: