Handle callback when returning early

This commit is contained in:
Christian Grigis 2020-10-27 10:42:24 +01:00 committed by Marvin W
parent f2bc5f5baa
commit 42da7aa2fa
1 changed files with 4 additions and 1 deletions

View File

@ -86,7 +86,10 @@ class ExposureNotificationServiceImpl(private val context: Context, private val
}
override fun start(params: StartParams) {
if (ExposurePreferences(context).enabled) return
if (ExposurePreferences(context).enabled) {
params.callback.onResult(Status.SUCCESS)
return
}
lifecycleScope.launchWhenStarted {
val status = confirmPermission(CONFIRM_ACTION_START)
if (status.isSuccess) {