From 9304375da769da2ecc370ed4abe9fee92f05f53b Mon Sep 17 00:00:00 2001 From: Marvin W Date: Tue, 18 Jan 2022 18:51:21 +0100 Subject: [PATCH] ENF: Use new base features --- .../exposurenotification/ExposureNotificationServiceImpl.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/play-services-nearby-core/src/main/kotlin/org/microg/gms/nearby/exposurenotification/ExposureNotificationServiceImpl.kt b/play-services-nearby-core/src/main/kotlin/org/microg/gms/nearby/exposurenotification/ExposureNotificationServiceImpl.kt index 4ea375ee..6e963ae9 100644 --- a/play-services-nearby-core/src/main/kotlin/org/microg/gms/nearby/exposurenotification/ExposureNotificationServiceImpl.kt +++ b/play-services-nearby-core/src/main/kotlin/org/microg/gms/nearby/exposurenotification/ExposureNotificationServiceImpl.kt @@ -277,9 +277,9 @@ class ExposureNotificationServiceImpl(private val context: Context, private val } ExposureSummary.ExposureSummaryBuilder() - .setDaysSinceLastExposure(exposures.map { it.daysSinceExposure }.min()?.toInt() ?: 0) + .setDaysSinceLastExposure(exposures.map { it.daysSinceExposure }.minOrNull()?.toInt() ?: 0) .setMatchedKeyCount(exposures.map { it.key }.distinct().size) - .setMaximumRiskScore(exposures.map { it.getRiskScore(configuration) }.max()?.toInt() ?: 0) + .setMaximumRiskScore(exposures.map { it.getRiskScore(configuration) }.maxOrNull()?.toInt() ?: 0) .setAttenuationDurations(intArrayOf( exposures.map { it.getAttenuationDurations(configuration)[0] }.sum(), exposures.map { it.getAttenuationDurations(configuration)[1] }.sum(), @@ -784,7 +784,7 @@ class ExposureNotificationServiceImpl(private val context: Context, private val } } - override fun onTransact(code: Int, data: Parcel, reply: Parcel?, flags: Int): Boolean = warnOnTransactionIssues(TAG, code, reply, flags) { super.onTransact(code, data, reply, flags) } + override fun onTransact(code: Int, data: Parcel, reply: Parcel?, flags: Int): Boolean = warnOnTransactionIssues(code, reply, flags) { super.onTransact(code, data, reply, flags) } companion object { private val tempGrantedPermissions: MutableSet> = hashSetOf()