mirror of
https://github.com/aljazceru/Android-nRF-Toolbox.git
synced 2025-12-23 01:14:26 +01:00
Fix crash when alarm is triggered before client is connected for PRX
This commit is contained in:
@@ -100,10 +100,6 @@ internal class PRXService : NotificationService() {
|
|||||||
.onEach { disconnect() }
|
.onEach { disconnect() }
|
||||||
.launchIn(lifecycleScope)
|
.launchIn(lifecycleScope)
|
||||||
|
|
||||||
repository.remoteAlarmLevel
|
|
||||||
.onEach { writeAlertLevel(it) }
|
|
||||||
.launchIn(lifecycleScope)
|
|
||||||
|
|
||||||
return START_REDELIVER_INTENT
|
return START_REDELIVER_INTENT
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -180,6 +176,10 @@ internal class PRXService : NotificationService() {
|
|||||||
.filterNotNull()
|
.filterNotNull()
|
||||||
.onEach { configureGatt(it, device) }
|
.onEach { configureGatt(it, device) }
|
||||||
.launchIn(lifecycleScope)
|
.launchIn(lifecycleScope)
|
||||||
|
|
||||||
|
repository.remoteAlarmLevel
|
||||||
|
.onEach { writeAlertLevel(it) }
|
||||||
|
.launchIn(lifecycleScope)
|
||||||
}
|
}
|
||||||
|
|
||||||
private suspend fun configureGatt(services: BleGattServices, device: ServerDevice) {
|
private suspend fun configureGatt(services: BleGattServices, device: ServerDevice) {
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ dependencyResolutionManagement {
|
|||||||
}
|
}
|
||||||
versionCatalogs {
|
versionCatalogs {
|
||||||
create("libs") {
|
create("libs") {
|
||||||
from("no.nordicsemi.android.gradle:version-catalog:1.4.2")
|
from("no.nordicsemi.android.gradle:version-catalog:1.4.3")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -79,6 +79,6 @@ include(":lib_utils")
|
|||||||
// includeBuild("../Android-Common-Libraries")
|
// includeBuild("../Android-Common-Libraries")
|
||||||
//}
|
//}
|
||||||
|
|
||||||
//if (file("../Kotlin-BLE-Library").exists()) {
|
if (file("../Kotlin-BLE-Library").exists()) {
|
||||||
// includeBuild("../Kotlin-BLE-Library")
|
includeBuild("../Kotlin-BLE-Library")
|
||||||
//}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user