mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
fix a couple of old/rare autobugs
This commit is contained in:
parent
39eb6664da
commit
1e47895904
3 changed files with 6 additions and 4 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue