mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-05-19 12:18:43 -04:00
fix a couple of old/rare autobugs
This commit is contained in:
@@ -93,6 +93,7 @@ class MeshService : Service(), Logging {
|
||||
|
||||
logAssert(
|
||||
(if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
// we have some samsung devices failing with https://issuetracker.google.com/issues/76112072#comment56 not sure what the fix is yet
|
||||
context.startForegroundService(intent)
|
||||
} else {
|
||||
context.startService(intent)
|
||||
@@ -1014,11 +1015,11 @@ class MeshService : Service(), Logging {
|
||||
proto.packet
|
||||
)
|
||||
|
||||
else -> TODO("Unexpected FromRadio variant")
|
||||
else -> errormsg("Unexpected FromRadio variant")
|
||||
}
|
||||
}
|
||||
|
||||
else -> TODO("Unexpected radio interface broadcast")
|
||||
else -> errormsg("Unexpected radio interface broadcast")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ import com.geeksville.android.Logging
|
||||
import com.geeksville.concurrent.DeferredExecution
|
||||
import com.geeksville.mesh.IRadioInterfaceService
|
||||
import com.geeksville.util.exceptionReporter
|
||||
import com.geeksville.util.ignoreException
|
||||
import com.geeksville.util.toRemoteExceptions
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
@@ -216,7 +217,7 @@ class RadioInterfaceService : Service(), Logging {
|
||||
val s = runningService
|
||||
if (s != null) {
|
||||
// Ignore any errors that happen while closing old device
|
||||
exceptionReporter {
|
||||
ignoreException {
|
||||
info("shutting down old service")
|
||||
s.setEnabled(false) // nasty, needed to force the next setEnabled call to reconnect
|
||||
}
|
||||
|
||||
Submodule geeksville-androidlib updated: ac6b27b379...bfe039fa19
Reference in New Issue
Block a user