mirror of
https://github.com/aljazceru/Android-nRF-Toolbox.git
synced 2025-12-22 17:04:23 +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() }
|
||||
.launchIn(lifecycleScope)
|
||||
|
||||
repository.remoteAlarmLevel
|
||||
.onEach { writeAlertLevel(it) }
|
||||
.launchIn(lifecycleScope)
|
||||
|
||||
return START_REDELIVER_INTENT
|
||||
}
|
||||
|
||||
@@ -180,6 +176,10 @@ internal class PRXService : NotificationService() {
|
||||
.filterNotNull()
|
||||
.onEach { configureGatt(it, device) }
|
||||
.launchIn(lifecycleScope)
|
||||
|
||||
repository.remoteAlarmLevel
|
||||
.onEach { writeAlertLevel(it) }
|
||||
.launchIn(lifecycleScope)
|
||||
}
|
||||
|
||||
private suspend fun configureGatt(services: BleGattServices, device: ServerDevice) {
|
||||
|
||||
@@ -50,7 +50,7 @@ dependencyResolutionManagement {
|
||||
}
|
||||
versionCatalogs {
|
||||
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")
|
||||
//}
|
||||
|
||||
//if (file("../Kotlin-BLE-Library").exists()) {
|
||||
// includeBuild("../Kotlin-BLE-Library")
|
||||
//}
|
||||
if (file("../Kotlin-BLE-Library").exists()) {
|
||||
includeBuild("../Kotlin-BLE-Library")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user