mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
0.7.2 hotfixes for autobugs
This commit is contained in:
parent
303fb86aa6
commit
c0ada64653
3 changed files with 16 additions and 7 deletions
|
|
@ -443,9 +443,11 @@ class MeshService : Service(), Logging {
|
|||
val wantForeground = RadioInterfaceService.getBondedDeviceAddress(this) != null
|
||||
|
||||
info("Requesting foreground service=$wantForeground")
|
||||
if (wantForeground)
|
||||
startForeground(notifyId, createNotification())
|
||||
else
|
||||
|
||||
// We always start foreground because that's how our service is always started (if we didn't then android would kill us)
|
||||
// but if we don't really need forground we immediately stop it.
|
||||
startForeground(notifyId, createNotification())
|
||||
if (!wantForeground)
|
||||
stopForeground(true)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue