- avoid possible crash when returning to main activity after deleting an

account
- use force when Quit is done again (it may still take some time to quit
  if there is no network connectivity)
- increased version codes
This commit is contained in:
Juha Heinanen
2018-11-11 05:32:40 +02:00
parent 64d744f5f2
commit fc4e09185d
3 changed files with 13 additions and 8 deletions
@@ -427,9 +427,10 @@ class BaresipService: Service() {
if (this::nm.isInitialized) nm.cancelAll()
if (this::wl.isInitialized && wl.isHeld) wl.release()
if (this::fl.isInitialized && fl.isHeld) fl.release()
if (IS_SERVICE_RUNNING)
baresipStop(false)
else if (RESTARTING)
if (IS_SERVICE_RUNNING) {
baresipStop(forceStop)
if (!forceStop) forceStop = true
} else if (RESTARTING)
restart()
}
@@ -452,6 +453,7 @@ class BaresipService: Service() {
val DEFAULT_CHANNEL_ID = "com.tutpro.baresip.default"
val HIGH_CHANNEL_ID = "com.tutpro.baresip.high"
var disconnected = false
var forceStop = false
}