From 5438e10009ad56518bfe99713499b8f14dae75b2 Mon Sep 17 00:00:00 2001 From: Georg Lukas Date: Mon, 5 Sep 2011 15:29:04 +0200 Subject: [PATCH] try to prevent double-service bug --- src/AprsService.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AprsService.scala b/src/AprsService.scala index 69a0f31..a497c08 100644 --- a/src/AprsService.scala +++ b/src/AprsService.scala @@ -144,15 +144,15 @@ class AprsService extends Service with LocationListener { } override def onDestroy() { - locMan.removeUpdates(this); + running = false // catch FC when service is killed from outside if (poster != null) { poster.stop() showToast(getString(R.string.service_stop)) } + locMan.removeUpdates(this); unregisterReceiver(msgNotifier) ServiceNotifier.instance.stop(this) - running = false } def getGpsInterval() : Int = {