fix crashlytics: if user shuts off bluetooth during scan, ignore failure

# Conflicts:
#	app/src/main/java/com/geeksville/mesh/ui/BTScanScreen.kt
This commit is contained in:
geeksville
2020-03-12 12:03:40 -07:00
parent 3bf285e77f
commit 04720e2f0e
2 changed files with 4 additions and 4 deletions

View File

@@ -1,10 +1,9 @@
package com.geeksville.mesh
import android.content.Context
import com.google.protobuf.util.JsonFormat
import com.geeksville.mesh.service.RadioInterfaceService
class SimRadio(private val context: Context) {
private val jsonParser = JsonFormat.parser()
/**
* When simulating we parse these MeshPackets as if they arrived at startup
@@ -42,7 +41,7 @@ class SimRadio(private val context: Context) {
simInitPackets.forEach { json ->
val fromRadio = MeshProtos.FromRadio.newBuilder().apply {
packet = MeshProtos.MeshPacket.newBuilder().apply {
jsonParser.merge(json, this)
// jsonParser.merge(json, this)
}.build()
}.build()