mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-03-24 00:33:14 -04:00
fix crashlytics report: if user turns off bluetooth, disabling scan might fail
This commit is contained in:
@@ -45,7 +45,11 @@ object ScanState : Logging {
|
||||
fun stopScan() {
|
||||
if (callback != null) {
|
||||
debug("stopping scan")
|
||||
scanner!!.stopScan(callback)
|
||||
try {
|
||||
scanner!!.stopScan(callback)
|
||||
} catch (ex: IllegalStateException) {
|
||||
warn("Ignoring error stopping scan, user probably disabled bluetooth: $ex")
|
||||
}
|
||||
callback = null
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user