From 51efde08c0af27dbfdcbf9fbbc02ca15887e9231 Mon Sep 17 00:00:00 2001 From: geeksville Date: Fri, 24 Apr 2020 15:59:01 -0700 Subject: [PATCH] 0.5.6 if we lose connection during initial radio download, fail gracefully --- app/build.gradle | 4 ++-- app/src/main/java/com/geeksville/mesh/service/MeshService.kt | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 17e02999b..d1df2c4cd 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -17,8 +17,8 @@ android { applicationId "com.geeksville.mesh" minSdkVersion 22 // The oldest emulator image I have tried is 22 (though 21 probably works) targetSdkVersion 29 - versionCode 155 - versionName "0.5.5" + versionCode 156 + versionName "0.5.6" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { 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 5302a63cb..c624d3063 100644 --- a/app/src/main/java/com/geeksville/mesh/service/MeshService.kt +++ b/app/src/main/java/com/geeksville/mesh/service/MeshService.kt @@ -970,6 +970,9 @@ class MeshService : Service(), Logging { startConfig() reportConnection() + } catch (ex: RadioNotConnectedException) { + // note: no need to call startDeviceSleep(), because this exception could only have reached us if it was already called + error("Lost connection to radio during init - waiting for reconnect") } catch (ex: RemoteException) { // It seems that when the ESP32 goes offline it can briefly come back for a 100ms ish which // causes the phone to try and reconnect. If we fail downloading our initial radio state we don't want to