Skip to content
Snippets Groups Projects
Unverified Commit bb1a9f91 authored by Matthias Urhahn's avatar Matthias Urhahn Committed by GitHub
Browse files

Improve logging to support debugging efforts (EXPOSUREAPP-6365) (#2813)

parent 30dafeb0
No related branches found
No related tags found
No related merge requests found
...@@ -23,7 +23,12 @@ class TestResultAvailableNotificationService @Inject constructor( ...@@ -23,7 +23,12 @@ class TestResultAvailableNotificationService @Inject constructor(
) { ) {
suspend fun showTestResultAvailableNotification(testResult: TestResult) { suspend fun showTestResultAvailableNotification(testResult: TestResult) {
if (foregroundState.isInForeground.first()) return Timber.d("showTestResultAvailableNotification(testResult=%s)", testResult)
if (foregroundState.isInForeground.first()) {
Timber.d("App in foreground, skipping notification.")
return
}
if (!cwaSettings.isNotificationsTestEnabled.value) { if (!cwaSettings.isNotificationsTestEnabled.value) {
Timber.i("Don't show test result available notification because user doesn't want to be informed") Timber.i("Don't show test result available notification because user doesn't want to be informed")
...@@ -42,6 +47,7 @@ class TestResultAvailableNotificationService @Inject constructor( ...@@ -42,6 +47,7 @@ class TestResultAvailableNotificationService @Inject constructor(
setContentIntent(pendingIntent) setContentIntent(pendingIntent)
}.build() }.build()
Timber.i("Showing TestResultAvailable notification!")
notificationHelper.sendNotification( notificationHelper.sendNotification(
notificationId = NotificationConstants.TEST_RESULT_AVAILABLE_NOTIFICATION_ID, notificationId = NotificationConstants.TEST_RESULT_AVAILABLE_NOTIFICATION_ID,
notification = notification, notification = notification,
......
...@@ -95,6 +95,8 @@ class DiagnosisTestResultRetrievalPeriodicWorker @AssistedInject constructor( ...@@ -95,6 +95,8 @@ class DiagnosisTestResultRetrievalPeriodicWorker @AssistedInject constructor(
tracingSettings.initialPollingForTestResultTimeStamp, tracingSettings.initialPollingForTestResultTimeStamp,
currentMillis currentMillis
) )
Timber.tag(TAG).d("Calculated days: %d", calculateDays)
if (calculateDays >= BackgroundConstants.POLLING_VALIDITY_MAX_DAYS) { if (calculateDays >= BackgroundConstants.POLLING_VALIDITY_MAX_DAYS) {
Timber.tag(TAG) Timber.tag(TAG)
.d(" $id Maximum of ${BackgroundConstants.POLLING_VALIDITY_MAX_DAYS} days for polling exceeded.") .d(" $id Maximum of ${BackgroundConstants.POLLING_VALIDITY_MAX_DAYS} days for polling exceeded.")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment