ENF: Use new base features

This commit is contained in:
Marvin W 2022-01-18 18:51:21 +01:00
parent fd8ce71a83
commit 9304375da7
No known key found for this signature in database
GPG Key ID: 072E9235DB996F2A
1 changed files with 3 additions and 3 deletions

View File

@ -277,9 +277,9 @@ class ExposureNotificationServiceImpl(private val context: Context, private val
} }
ExposureSummary.ExposureSummaryBuilder() 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) .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( .setAttenuationDurations(intArrayOf(
exposures.map { it.getAttenuationDurations(configuration)[0] }.sum(), exposures.map { it.getAttenuationDurations(configuration)[0] }.sum(),
exposures.map { it.getAttenuationDurations(configuration)[1] }.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 { companion object {
private val tempGrantedPermissions: MutableSet<Pair<String, String>> = hashSetOf() private val tempGrantedPermissions: MutableSet<Pair<String, String>> = hashSetOf()