kopia lustrzana https://github.com/ge0rg/aprsdroid
try to prevent double-service bug
rodzic
81cf26c68a
commit
5438e10009
|
@ -144,15 +144,15 @@ class AprsService extends Service with LocationListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
override def onDestroy() {
|
override def onDestroy() {
|
||||||
locMan.removeUpdates(this);
|
running = false
|
||||||
// catch FC when service is killed from outside
|
// catch FC when service is killed from outside
|
||||||
if (poster != null) {
|
if (poster != null) {
|
||||||
poster.stop()
|
poster.stop()
|
||||||
showToast(getString(R.string.service_stop))
|
showToast(getString(R.string.service_stop))
|
||||||
}
|
}
|
||||||
|
locMan.removeUpdates(this);
|
||||||
unregisterReceiver(msgNotifier)
|
unregisterReceiver(msgNotifier)
|
||||||
ServiceNotifier.instance.stop(this)
|
ServiceNotifier.instance.stop(this)
|
||||||
running = false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def getGpsInterval() : Int = {
|
def getGpsInterval() : Int = {
|
||||||
|
|
Ładowanie…
Reference in New Issue