mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-03-15 20:40:33 -04:00
fix crashlytics: if user shuts off bluetooth during scan, ignore failure
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user