From 8f7aa04e79c2d4d2384cc7c080ecc6ca25d93753 Mon Sep 17 00:00:00 2001 From: cocoa-dev004 <66989461+cocoa-dev004@users.noreply.github.com> Date: Thu, 2 Jun 2022 15:26:24 +0900 Subject: [PATCH 1/2] Fixed status check when exposure detection --- .../Services/AbsExposureDetectionBackgroundService.cs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/Covid19Radar/Covid19Radar/Services/AbsExposureDetectionBackgroundService.cs b/Covid19Radar/Covid19Radar/Services/AbsExposureDetectionBackgroundService.cs index ceced3d98..93dee7888 100644 --- a/Covid19Radar/Covid19Radar/Services/AbsExposureDetectionBackgroundService.cs +++ b/Covid19Radar/Covid19Radar/Services/AbsExposureDetectionBackgroundService.cs @@ -81,17 +81,6 @@ private async Task InternalExposureDetectionAsync(CancellationTokenSource cancel return; } - IEnumerable statuseCodes = await _exposureNotificationApiService.GetStatusCodesAsync(); - - bool isActivated = statuseCodes.Contains(ExposureNotificationStatus.Code_Android.ACTIVATED) - | statuseCodes.Contains(ExposureNotificationStatus.Code_iOS.Active); - - if (!isActivated) - { - _loggerService.Info($"EN API is not ACTIVATED."); - return; - } - var cancellationToken = cancellationTokenSource?.Token ?? default(CancellationToken); await _serverConfigurationRepository.LoadAsync(); From a783df6ddc0108a760b6b9bcc22a4f5464ee29cf Mon Sep 17 00:00:00 2001 From: cocoa-dev004 <66989461+cocoa-dev004@users.noreply.github.com> Date: Fri, 3 Jun 2022 09:44:35 +0900 Subject: [PATCH 2/2] Add status log --- .../Services/AbsExposureDetectionBackgroundService.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Covid19Radar/Covid19Radar/Services/AbsExposureDetectionBackgroundService.cs b/Covid19Radar/Covid19Radar/Services/AbsExposureDetectionBackgroundService.cs index 93dee7888..0fecf6385 100644 --- a/Covid19Radar/Covid19Radar/Services/AbsExposureDetectionBackgroundService.cs +++ b/Covid19Radar/Covid19Radar/Services/AbsExposureDetectionBackgroundService.cs @@ -81,6 +81,9 @@ private async Task InternalExposureDetectionAsync(CancellationTokenSource cancel return; } + IEnumerable statusCodes = await _exposureNotificationApiService.GetStatusCodesAsync(); + _loggerService.Info($"EN API status code. [{string.Join(",", statusCodes)}]"); + var cancellationToken = cancellationTokenSource?.Token ?? default(CancellationToken); await _serverConfigurationRepository.LoadAsync();