Commit 9eb328aa authored by stopcovid@lunabee.com's avatar stopcovid@lunabee.com

Update to 2.1.0

parent f1f607b7
......@@ -5,7 +5,7 @@
*
* Authors
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Created by Orange / Date - 2020/04/27 - for the STOP-COVID project
* Created by Orange / Date - 2020/04/27 - for the TOUS-ANTI-COVID project
*/
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
......@@ -41,33 +41,29 @@ android {
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:_"
api 'no.nordicsemi.android.support.v18:scanner:1.4.3'
implementation 'com.jakewharton.timber:timber:4.7.1'
api 'no.nordicsemi.android.support.v18:scanner:_'
implementation 'com.jakewharton.timber:timber:_'
testImplementation 'junit:junit:4.13'
testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0"
testImplementation "org.robolectric:robolectric:4.3.1"
testImplementation 'junit:junit:_'
testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:_"
testImplementation "org.robolectric:robolectric:_"
def mockitoVersion = '3.5.11'
testImplementation "org.mockito:mockito-core:${mockitoVersion}"
testImplementation "org.mockito:mockito-inline:${mockitoVersion}"
testImplementation "org.mockito:mockito-core:_"
testImplementation "org.mockito:mockito-inline:_"
def androidXTestVersion = '1.3.0'
testImplementation "androidx.test:core-ktx:${androidXTestVersion}"
testImplementation "androidx.test:monitor:${androidXTestVersion}"
testImplementation "androidx.test:runner:${androidXTestVersion}"
testImplementation "androidx.test:rules:${androidXTestVersion}"
testImplementation "androidx.test.ext:truth:${androidXTestVersion}"
testImplementation "androidx.test:core-ktx:_"
testImplementation "androidx.test:monitor:_"
testImplementation "androidx.test:runner:_"
testImplementation "androidx.test:rules:_"
testImplementation "androidx.test.ext:truth:_"
def androidXTestJUnitVersion = '1.1.2'
testImplementation "androidx.test.ext:junit:${androidXTestJUnitVersion}"
testImplementation "androidx.test.ext:junit:_"
def coroutines_version = "1.3.9"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutines_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:_"
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:_"
testImplementation "com.googlecode.zohhak:zohhak:1.1.1"
testImplementation "com.googlecode.zohhak:zohhak:_"
}
......@@ -5,7 +5,7 @@
~
~ Authors
~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Created by Orange / Date - 2020/04/27 - for the STOP-COVID project
~ Created by Orange / Date - 2020/04/27 - for the TOUS-ANTI-COVID project
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
......
......@@ -5,7 +5,7 @@
*
* Authors
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Created by Orange / Date - 2020/04/27 - for the STOP-COVID project
* Created by Orange / Date - 2020/04/27 - for the TOUS-ANTI-COVID project
*/
package com.orange.proximitynotification
......
......@@ -5,7 +5,7 @@
*
* Authors
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Created by Orange / Date - 2020/04/27 - for the STOP-COVID project
* Created by Orange / Date - 2020/04/27 - for the TOUS-ANTI-COVID project
*/
package com.orange.proximitynotification
......
......@@ -5,7 +5,7 @@
*
* Authors
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Created by Orange / Date - 2020/04/27 - for the STOP-COVID project
* Created by Orange / Date - 2020/04/27 - for the TOUS-ANTI-COVID project
*/
package com.orange.proximitynotification
......
......@@ -5,7 +5,7 @@
*
* Authors
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Created by Orange / Date - 2020/04/27 - for the STOP-COVID project
* Created by Orange / Date - 2020/04/27 - for the TOUS-ANTI-COVID project
*/
package com.orange.proximitynotification
......
......@@ -5,7 +5,7 @@
*
* Authors
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Created by Orange / Date - 2020/09/14 - for the STOP-COVID project
* Created by Orange / Date - 2020/09/14 - for the TOUS-ANTI-COVID project
*/
package com.orange.proximitynotification
......@@ -14,6 +14,11 @@ sealed class ProximityNotificationEvent {
abstract val id: ProximityNotificationEventId
data class Verbose(
override val id: ProximityNotificationEventId,
val message: String
) : ProximityNotificationEvent()
data class Debug(
override val id: ProximityNotificationEventId,
val message: String
......
......@@ -5,7 +5,7 @@
*
* Authors
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Created by Orange / Date - 2020/09/14 - for the STOP-COVID project
* Created by Orange / Date - 2020/09/14 - for the TOUS-ANTI-COVID project
*/
package com.orange.proximitynotification
......
......@@ -5,7 +5,7 @@
*
* Authors
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Created by Orange / Date - 2020/09/14 - for the STOP-COVID project
* Created by Orange / Date - 2020/09/14 - for the TOUS-ANTI-COVID project
*/
package com.orange.proximitynotification
......@@ -31,6 +31,10 @@ object ProximityNotificationLogger {
@Synchronized
fun log(event: ProximityNotificationEvent) = listener?.onEvent(event)
fun verbose(eventId: ProximityNotificationEventId, message: String) = log(
ProximityNotificationEvent.Verbose(eventId, message)
)
fun debug(eventId: ProximityNotificationEventId, message: String) = log(
ProximityNotificationEvent.Debug(eventId, message)
)
......
......@@ -5,7 +5,7 @@
*
* Authors
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Created by Orange / Date - 2020/04/27 - for the STOP-COVID project
* Created by Orange / Date - 2020/04/27 - for the TOUS-ANTI-COVID project
*/
package com.orange.proximitynotification
......@@ -221,7 +221,7 @@ abstract class ProximityNotificationService : Service(),
}
override fun onEvent(event: ProximityNotificationEvent) {
Timber.d("onEvent event = $event")
Timber.v("onEvent event = $event")
}
/**
......
......@@ -5,7 +5,7 @@
*
* Authors
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Created by Orange / Date - 2020/04/27 - for the STOP-COVID project
* Created by Orange / Date - 2020/04/27 - for the TOUS-ANTI-COVID project
*/
package com.orange.proximitynotification
......
......@@ -5,7 +5,7 @@
*
* Authors
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Created by Orange / Date - 2020/04/27 - for the STOP-COVID project
* Created by Orange / Date - 2020/04/27 - for the TOUS-ANTI-COVID project
*/
package com.orange.proximitynotification
......
......@@ -5,7 +5,7 @@
*
* Authors
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Created by Orange / Date - 2020/04/27 - for the STOP-COVID project
* Created by Orange / Date - 2020/04/27 - for the TOUS-ANTI-COVID project
*/
package com.orange.proximitynotification.ble
......
......@@ -5,7 +5,7 @@
*
* Authors
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Created by Orange / Date - 2020/04/27 - for the STOP-COVID project
* Created by Orange / Date - 2020/04/27 - for the TOUS-ANTI-COVID project
*/
package com.orange.proximitynotification.ble
......
......@@ -5,7 +5,7 @@
*
* Authors
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Created by Orange / Date - 2020/04/27 - for the STOP-COVID project
* Created by Orange / Date - 2020/04/27 - for the TOUS-ANTI-COVID project
*/
package com.orange.proximitynotification.ble
......
......@@ -5,7 +5,7 @@
*
* Authors
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Created by Orange / Date - 2020/04/27 - for the STOP-COVID project
* Created by Orange / Date - 2020/04/27 - for the TOUS-ANTI-COVID project
*/
package com.orange.proximitynotification.ble
......
......@@ -5,7 +5,7 @@
*
* Authors
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Created by Orange / Date - 2020/05/07 - for the STOP-COVID project
* Created by Orange / Date - 2020/05/07 - for the TOUS-ANTI-COVID project
*/
package com.orange.proximitynotification.ble
......
......@@ -5,7 +5,7 @@
*
* Authors
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Created by Orange / Date - 2020/05/08 - for the STOP-COVID project
* Created by Orange / Date - 2020/05/08 - for the TOUS-ANTI-COVID project
*/
package com.orange.proximitynotification.ble
......
......@@ -5,7 +5,7 @@
*
* Authors
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Created by Orange / Date - 2020/05/19 - for the STOP-COVID project
* Created by Orange / Date - 2020/05/19 - for the TOUS-ANTI-COVID project
*/
package com.orange.proximitynotification.ble
......
......@@ -5,7 +5,7 @@
*
* Authors
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Created by Orange / Date - 2020/06/30 - for the STOP-COVID project
* Created by Orange / Date - 2020/06/30 - for the TOUS-ANTI-COVID project
*/
package com.orange.proximitynotification.ble
......
......@@ -5,7 +5,7 @@
*
* Authors
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Created by Orange / Date - 2020/04/27 - for the STOP-COVID project
* Created by Orange / Date - 2020/04/27 - for the TOUS-ANTI-COVID project
*/
package com.orange.proximitynotification.ble
......
......@@ -5,7 +5,7 @@
*
* Authors
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Created by Orange / Date - 2020/05/19 - for the STOP-COVID project
* Created by Orange / Date - 2020/05/19 - for the TOUS-ANTI-COVID project
*/
package com.orange.proximitynotification.ble
......
......@@ -5,7 +5,7 @@
*
* Authors
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Created by Orange / Date - 2020/04/27 - for the STOP-COVID project
* Created by Orange / Date - 2020/04/27 - for the TOUS-ANTI-COVID project
*/
package com.orange.proximitynotification.ble
......
......@@ -5,7 +5,7 @@
*
* Authors
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Created by Orange / Date - 2020/04/27 - for the STOP-COVID project
* Created by Orange / Date - 2020/04/27 - for the TOUS-ANTI-COVID project
*/
package com.orange.proximitynotification.ble.advertiser
......
......@@ -5,7 +5,7 @@
*
* Authors
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Created by Orange / Date - 2020/04/27 - for the STOP-COVID project
* Created by Orange / Date - 2020/04/27 - for the TOUS-ANTI-COVID project
*/
package com.orange.proximitynotification.ble.advertiser
......
......@@ -5,7 +5,7 @@
*
* Authors
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Created by Orange / Date - 2020/04/27 - for the STOP-COVID project
* Created by Orange / Date - 2020/04/27 - for the TOUS-ANTI-COVID project
*/
package com.orange.proximitynotification.ble.calibration
......
......@@ -5,7 +5,7 @@
*
* Authors
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Created by Orange / Date - 2020/05/16 - for the STOP-COVID project
* Created by Orange / Date - 2020/05/16 - for the TOUS-ANTI-COVID project
*/
package com.orange.proximitynotification.ble.gatt
......
......@@ -5,7 +5,7 @@
*
* Authors
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Created by Orange / Date - 2020/05/16 - for the STOP-COVID project
* Created by Orange / Date - 2020/05/16 - for the TOUS-ANTI-COVID project
*/
package com.orange.proximitynotification.ble.gatt
......@@ -78,7 +78,7 @@ internal class BleGattClientImpl(
private inner class Callback : BluetoothGattCallback() {
override fun onConnectionStateChange(gatt: BluetoothGatt, status: Int, newState: Int) {
Timber.d("onConnectionStateChange status=$status, newState=$newState")
Timber.i("onConnectionStateChange status=$status, newState=$newState")
_isConnected = status == GATT_SUCCESS && newState == BluetoothProfile.STATE_CONNECTED
when (status) {
......@@ -88,7 +88,7 @@ internal class BleGattClientImpl(
}
override fun onReadRemoteRssi(gatt: BluetoothGatt, rssi: Int, status: Int) {
Timber.d("onReadRemoteRssi status=$status, rssi=$rssi")
Timber.i("onReadRemoteRssi status=$status, rssi=$rssi")
remoteRssiChannel.safeOffer(ValueWithStatus(status = status, value = rssi))
}
}
......
......@@ -5,7 +5,7 @@
*
* Authors
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Created by Orange / Date - 2020/05/17 - for the STOP-COVID project
* Created by Orange / Date - 2020/05/17 - for the TOUS-ANTI-COVID project
*/
package com.orange.proximitynotification.ble.gatt
......