fix crashlytics: if user shuts off bluetooth during scan, ignore failure

pull/8/head
Kevin Hester 2020-03-03 11:00:01 -08:00 zatwierdzone przez geeksville
rodzic 9b2a6f3c92
commit 3bf285e77f
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -47,8 +47,8 @@ object ScanState : Logging {
debug("stopping scan")
try {
scanner!!.stopScan(callback)
} catch (ex: IllegalStateException) {
warn("Ignoring error stopping scan, user probably disabled bluetooth: $ex")
} catch (ex: Throwable) {
warn("Ignoring error stopping scan, probably BT adapter was disabled suddenly: ${ex.message}")
}
callback = null
}