Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Commit

Permalink
Change failure to success. (#1718)
Browse files Browse the repository at this point in the history
Fix for persistent notifications on Android.
  • Loading branch information
James Eberhardt authored Jun 22, 2021
1 parent c39caa0 commit 47f9550
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class ExposureCheckNotificationWorker (private val context: Context, parameters:
setForeground(foregroundInfo)
} catch (exception: Exception) {
filteredMetricsService.addDebugMetric(107.0, exception.message ?: "Unknown")
return Result.failure()
return Result.success()
}

val enIsEnabled = exposureNotificationClient.isEnabled.await()
Expand All @@ -95,7 +95,7 @@ class ExposureCheckNotificationWorker (private val context: Context, parameters:
return Result.success()
} catch (exception: Exception) {
filteredMetricsService.addDebugMetric(106.0, exception.message ?: "Unknown")
return Result.failure()
return Result.success()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,17 @@ class ExposureCheckSchedulerWorker (val context: Context, parameters: WorkerPara
} catch (exception: TimeoutCancellationException) {
filteredMetricsService.addDebugMetric(101.0, exception.message ?: "Unknown")
log("doWork exception", mapOf("message" to "Timeout"))
return Result.failure()
return Result.success()
} catch (exception: Exception) {
filteredMetricsService.addDebugMetric(102.0, exception.message ?: "Unknown")
log("doWork exception", mapOf("message" to (exception.message ?: "Unknown")))
return Result.failure()
return Result.success()
}
}
} catch (exception: Exception) {
filteredMetricsService.addDebugMetric(103.0, exception.message ?: "Unknown")
Log.d("exception", "exception")
return Result.failure()
return Result.success()
}

return Result.success()
Expand Down

0 comments on commit 47f9550

Please sign in to comment.