Fix passive config requests triggering a refresh (EXPOSUREAPP-3774) (#1608)
* Make config sharing behavior `SharingStarted.Lazily`. (start once, never release) Otherwise classes that are just interested in the current config, if there is no other subscriber active, would launch the `startValueProvider` and pull a config each time. The ExposureDetectionTracker is such a candidate that would like to use the latest config every ~3min. While this already no longer happens since "Track config changes" (4d1ecb54), because there is no a class that is permanently subscribed to `currentConfig`, we should not rely on side-effects, so let's make the sharing behavior explicit. * Fix test regression. Co-authored-by:harambasicluka <64483219+harambasicluka@users.noreply.github.com>
Showing
- Corona-Warn-App/src/main/java/de/rki/coronawarnapp/appconfig/AppConfigProvider.kt 1 addition, 1 deletion.../java/de/rki/coronawarnapp/appconfig/AppConfigProvider.kt
- Corona-Warn-App/src/test/java/de/rki/coronawarnapp/appconfig/AppConfigProviderTest.kt 2 additions, 2 deletions...a/de/rki/coronawarnapp/appconfig/AppConfigProviderTest.kt
Please register or sign in to comment