mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-03-30 19:54:27 -04:00
fix #123 stop service when disconnected
This commit is contained in:
@@ -457,7 +457,8 @@ class MeshService : Service(), Logging {
|
||||
* tell android not to kill us
|
||||
*/
|
||||
private fun startForeground() {
|
||||
val wantForeground = RadioInterfaceService.getBondedDeviceAddress(this) != null
|
||||
val a = RadioInterfaceService.getBondedDeviceAddress(this)
|
||||
val wantForeground = a != null && a != "n"
|
||||
|
||||
info("Requesting foreground service=$wantForeground")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user