kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
autobug - don't fail if the gatt goes away while we are connecting
rodzic
3246bd6505
commit
68cc494021
|
@ -285,10 +285,11 @@ class BluetoothInterface(val service: RadioInterfaceService, val address: String
|
||||||
*/
|
*/
|
||||||
private fun forceServiceRefresh() {
|
private fun forceServiceRefresh() {
|
||||||
exceptionReporter {
|
exceptionReporter {
|
||||||
// BluetoothGatt gatt
|
// If the gatt has been destroyed, skip the refresh attempt
|
||||||
val gatt = safe!!.gatt!!
|
safe?.gatt?.let { gatt ->
|
||||||
val refresh: Method = gatt.javaClass.getMethod("refresh")
|
val refresh: Method = gatt.javaClass.getMethod("refresh")
|
||||||
refresh.invoke(gatt)
|
refresh.invoke(gatt)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue