From 6d423bb8e485edebebff6ce6a0dc74da5022b49f Mon Sep 17 00:00:00 2001 From: Marvin W Date: Sun, 20 Dec 2020 11:57:24 +0100 Subject: [PATCH] EN: Make rotated key use same start number as regular key This hides the fact that the key was rotated. Probably never needed because one is not going to get infected twice within 14 days, but doesn't hurt either. --- .../microg/gms/nearby/exposurenotification/ExposureDatabase.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/play-services-nearby-core/src/main/kotlin/org/microg/gms/nearby/exposurenotification/ExposureDatabase.kt b/play-services-nearby-core/src/main/kotlin/org/microg/gms/nearby/exposurenotification/ExposureDatabase.kt index 74251e21..b0670c5a 100644 --- a/play-services-nearby-core/src/main/kotlin/org/microg/gms/nearby/exposurenotification/ExposureDatabase.kt +++ b/play-services-nearby-core/src/main/kotlin/org/microg/gms/nearby/exposurenotification/ExposureDatabase.kt @@ -649,7 +649,7 @@ class ExposureDatabase private constructor(private val context: Context) : SQLit update(TABLE_TEK, ContentValues().apply { put("rollingPeriod", intervalNumber - key.rollingStartIntervalNumber) }, "rollingStartNumber = ?", arrayOf(key.rollingStartIntervalNumber.toString())) - storeOwnKey(generateIntraDayTemporaryExposureKey(intervalNumber), database) + storeOwnKey(generateCurrentDayTemporaryExposureKey(), database) } database.setTransactionSuccessful() val startRollingNumber = (getDayRollingStartNumber(intervalNumber) - 14 * ROLLING_PERIOD)