service: silence unregister crash of not registered Receiver

android11
Georg Lukas 2020-09-14 18:44:36 +02:00
rodzic b607a9f8a4
commit 800d30fdd3
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -218,7 +218,9 @@ class AprsService extends Service {
}
msgService.stop()
locSource.stop()
unregisterReceiver(msgNotifier)
scala.util.control.Exception.ignoring(classOf[IllegalArgumentException]) {
unregisterReceiver(msgNotifier)
}
ServiceNotifier.instance.stop(this)
}