mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
fix #123 stop service when disconnected
This commit is contained in:
parent
76bbc2e4eb
commit
9cea9ce457
1 changed files with 2 additions and 1 deletions
|
|
@ -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")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue