fix crashlytics auto report. oops error() is now a kotlin stdlib call

and therefore I was accidentally calling it instead of my Logging.error()
method.  And that made some error logs incorrectly fatal.
1.2-legacy
Kevin Hester 2020-02-29 13:21:05 -08:00
rodzic 49ed2b8e1f
commit 6a90881dd6
5 zmienionych plików z 8 dodań i 6 usunięć

Wyświetl plik

@ -2,6 +2,7 @@
<dictionary name="kevinh">
<words>
<w>crashlytics</w>
<w>errormsg</w>
<w>geeksville</w>
<w>meshtastic</w>
</words>

Wyświetl plik

@ -5,12 +5,13 @@ import android.os.RemoteException
import android.util.Base64
import androidx.compose.mutableStateOf
import androidx.core.content.edit
import com.geeksville.android.Logging
import com.geeksville.mesh.IMeshService
import com.geeksville.mesh.MeshProtos
import com.geeksville.mesh.ui.getInitials
/// FIXME - figure out how to merge this staate with the AppStatus Model
object UIState {
object UIState: Logging {
/// Kinda ugly - created in the activity but used from Compose - figure out if there is a cleaner way GIXME
// lateinit var googleSignInClient: GoogleSignInClient
@ -59,7 +60,7 @@ object UIState {
getInitials(ownerName)
) // Note: we use ?. here because we might be running in the emulator
} catch (ex: RemoteException) {
error("Can't set username on device, is device offline? ${ex.message}")
errormsg("Can't set username on device, is device offline? ${ex.message}")
}
}
}

Wyświetl plik

@ -182,7 +182,7 @@ class MeshService : Service(), Logging {
}
locationSettingsResponse.addOnFailureListener { exception ->
error("Failed to listen to GPS")
errormsg("Failed to listen to GPS")
if (exception is ResolvableApiException) {
Exceptions.report(exception) // FIXME, not yet implemented, report failure to mothership
exceptionReporter {

Wyświetl plik

@ -298,7 +298,7 @@ class RadioInterfaceService : Service(), Logging {
if (on) {
val address = getBondedDeviceAddress(this)
if (address == null)
error("No bonded mesh radio, can't create service")
errormsg("No bonded mesh radio, can't create service")
else {
// Note: this call does no comms, it just creates the device object (even if the
// device is off/not connected)
@ -316,7 +316,7 @@ class RadioInterfaceService : Service(), Logging {
// more info
s.asyncConnect(true, ::onConnect, ::onDisconnect)
} else {
error("Bluetooth adapter not found, assuming running on the emulator!")
errormsg("Bluetooth adapter not found, assuming running on the emulator!")
}
if (logSends)

Wyświetl plik

@ -111,7 +111,7 @@ class SafeBluetooth(private val context: Context, private val device: BluetoothD
fun restartBle() {
GeeksvilleApplication.analytics.track("ble_restart") // record # of times we needed to use this nasty hack
error("Doing emergency BLE restart")
errormsg("Doing emergency BLE restart")
val mgr =
context.getSystemService(Context.BLUETOOTH_SERVICE) as BluetoothManager
val adp = mgr.adapter