kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
fix crashlytics report: if user turns off bluetooth, disabling scan might fail
rodzic
bb3acc1d0b
commit
9f7ab46bbe
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue