Loading play-services-nearby-core/src/main/kotlin/org/microg/gms/nearby/exposurenotification/ExposureDatabase.kt +7 −1 Original line number Original line Diff line number Diff line Loading @@ -130,6 +130,12 @@ class ExposureDatabase private constructor(private val context: Context) : SQLit Log.d(TAG, "Get rid of isEnabled log entries") Log.d(TAG, "Get rid of isEnabled log entries") db.delete(TABLE_APP_LOG, "method = ?", arrayOf("isEnabled")); db.delete(TABLE_APP_LOG, "method = ?", arrayOf("isEnabled")); } } if (oldVersion == 11) { Log.d(TAG, "Fixing invalid rssi values from version 11 with release 0.2.23") // Setting the RSSI to -75. This is obviously not the correct value, but is still way better estimate // than 0, based on the measurements shown in https://github.com/microg/GmsCore/issues/1655 db.execSQL("UPDATE $TABLE_ADVERTISEMENTS SET rssi = -75 WHERE rssi = 0 AND duration > 0") } Log.d(TAG, "Finished database upgrade") Log.d(TAG, "Finished database upgrade") } } Loading Loading @@ -835,7 +841,7 @@ class ExposureDatabase private constructor(private val context: Context) : SQLit companion object { companion object { private const val DB_NAME = "exposure.db" private const val DB_NAME = "exposure.db" private const val DB_VERSION = 11 private const val DB_VERSION = 12 private const val DB_SIZE_TOO_LARGE = 256L * 1024 * 1024 private const val DB_SIZE_TOO_LARGE = 256L * 1024 * 1024 private const val MAX_DELETE_TIME = 5000L private const val MAX_DELETE_TIME = 5000L private const val TABLE_ADVERTISEMENTS = "advertisements" private const val TABLE_ADVERTISEMENTS = "advertisements" Loading Loading
play-services-nearby-core/src/main/kotlin/org/microg/gms/nearby/exposurenotification/ExposureDatabase.kt +7 −1 Original line number Original line Diff line number Diff line Loading @@ -130,6 +130,12 @@ class ExposureDatabase private constructor(private val context: Context) : SQLit Log.d(TAG, "Get rid of isEnabled log entries") Log.d(TAG, "Get rid of isEnabled log entries") db.delete(TABLE_APP_LOG, "method = ?", arrayOf("isEnabled")); db.delete(TABLE_APP_LOG, "method = ?", arrayOf("isEnabled")); } } if (oldVersion == 11) { Log.d(TAG, "Fixing invalid rssi values from version 11 with release 0.2.23") // Setting the RSSI to -75. This is obviously not the correct value, but is still way better estimate // than 0, based on the measurements shown in https://github.com/microg/GmsCore/issues/1655 db.execSQL("UPDATE $TABLE_ADVERTISEMENTS SET rssi = -75 WHERE rssi = 0 AND duration > 0") } Log.d(TAG, "Finished database upgrade") Log.d(TAG, "Finished database upgrade") } } Loading Loading @@ -835,7 +841,7 @@ class ExposureDatabase private constructor(private val context: Context) : SQLit companion object { companion object { private const val DB_NAME = "exposure.db" private const val DB_NAME = "exposure.db" private const val DB_VERSION = 11 private const val DB_VERSION = 12 private const val DB_SIZE_TOO_LARGE = 256L * 1024 * 1024 private const val DB_SIZE_TOO_LARGE = 256L * 1024 * 1024 private const val MAX_DELETE_TIME = 5000L private const val MAX_DELETE_TIME = 5000L private const val TABLE_ADVERTISEMENTS = "advertisements" private const val TABLE_ADVERTISEMENTS = "advertisements" Loading