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.
This commit is contained in:
Marvin W 2020-12-20 11:57:24 +01:00
parent b21b523a82
commit 6d423bb8e4
No known key found for this signature in database
GPG Key ID: 072E9235DB996F2A

View File

@ -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)