mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
fix crashlytics: if user shuts off bluetooth during scan, ignore failure
This commit is contained in:
parent
64e4e05a0b
commit
4bce536506
1 changed files with 5 additions and 1 deletions
|
|
@ -43,7 +43,11 @@ object ScanState : Logging {
|
|||
fun stopScan() {
|
||||
if (callback != null) {
|
||||
debug("stopping scan")
|
||||
scanner!!.stopScan(callback)
|
||||
try {
|
||||
scanner!!.stopScan(callback)
|
||||
} catch(ex: Throwable) {
|
||||
warn("Ignoring error stopping scan, probably BT adapter was disabled suddenly: ${ex.message}")
|
||||
}
|
||||
callback = null
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue