mirror of
https://github.com/TeamVanced/VancedMicroG
synced 2024-11-27 14:36:49 +01:00
Fix overflow that prevents matching
This commit is contained in:
parent
5b06366cd5
commit
4e3c03cfaa
@ -346,7 +346,7 @@ class ExposureDatabase private constructor(private val context: Context) : SQLit
|
||||
val keys = listSingleDiagnosisKeysPendingSearch(tid, database)
|
||||
val oldestRpi = oldestRpi
|
||||
for (key in keys) {
|
||||
if ((key.rollingStartIntervalNumber + key.rollingPeriod) * ROLLING_WINDOW_LENGTH_MS + ALLOWED_KEY_OFFSET_MS < oldestRpi) {
|
||||
if ((key.rollingStartIntervalNumber + key.rollingPeriod).toLong() * ROLLING_WINDOW_LENGTH_MS + ALLOWED_KEY_OFFSET_MS < oldestRpi) {
|
||||
// Early ignore because key is older than since we started scanning.
|
||||
applySingleDiagnosisKeySearchResult(key, false, database)
|
||||
} else {
|
||||
@ -385,7 +385,7 @@ class ExposureDatabase private constructor(private val context: Context) : SQLit
|
||||
riskLogged = key.transmissionRiskLevel
|
||||
Log.d(TAG, "First key with risk ${key.transmissionRiskLevel}: ${ByteString.of(*key.keyData).hex()} starts ${key.rollingStartIntervalNumber}")
|
||||
}
|
||||
if ((key.rollingStartIntervalNumber + key.rollingPeriod) * ROLLING_WINDOW_LENGTH_MS + ALLOWED_KEY_OFFSET_MS < oldestRpi) {
|
||||
if ((key.rollingStartIntervalNumber + key.rollingPeriod).toLong() * ROLLING_WINDOW_LENGTH_MS + ALLOWED_KEY_OFFSET_MS < oldestRpi) {
|
||||
// Early ignore because key is older than since we started scanning.
|
||||
ignored++;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user