diff --git a/app/src/main/java/com/geeksville/mesh/service/MeshService.kt b/app/src/main/java/com/geeksville/mesh/service/MeshService.kt index 677704698..5090fe03f 100644 --- a/app/src/main/java/com/geeksville/mesh/service/MeshService.kt +++ b/app/src/main/java/com/geeksville/mesh/service/MeshService.kt @@ -73,7 +73,9 @@ class MeshService : Service(), Logging { class IdNotFoundException(id: String) : Exception("ID not found $id") class NodeNumNotFoundException(id: Int) : Exception("NodeNum not found $id") - class IsUpdatingException() : Exception("Operation prohibited during firmware update") + + /** We treat software update as similar to loss of comms to the regular bluetooth service (so things like sendPosition for background GPS ignores the problem */ + class IsUpdatingException() : RadioNotConnectedException("Operation prohibited during firmware update") /** * Talk to our running service and try to set a new device address. And then immediately diff --git a/app/src/main/java/com/geeksville/mesh/service/RadioInterfaceService.kt b/app/src/main/java/com/geeksville/mesh/service/RadioInterfaceService.kt index c24e5aa87..78890c334 100644 --- a/app/src/main/java/com/geeksville/mesh/service/RadioInterfaceService.kt +++ b/app/src/main/java/com/geeksville/mesh/service/RadioInterfaceService.kt @@ -22,7 +22,7 @@ import kotlinx.coroutines.Job import kotlinx.coroutines.cancel -class RadioNotConnectedException(message: String = "Not connected to radio") : +open class RadioNotConnectedException(message: String = "Not connected to radio") : BLEException(message)