mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-06-02 06:24:16 +02:00
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.
This commit is contained in:
Generated
+1
@@ -2,6 +2,7 @@
|
|||||||
<dictionary name="kevinh">
|
<dictionary name="kevinh">
|
||||||
<words>
|
<words>
|
||||||
<w>crashlytics</w>
|
<w>crashlytics</w>
|
||||||
|
<w>errormsg</w>
|
||||||
<w>geeksville</w>
|
<w>geeksville</w>
|
||||||
<w>meshtastic</w>
|
<w>meshtastic</w>
|
||||||
</words>
|
</words>
|
||||||
|
|||||||
@@ -5,12 +5,13 @@ import android.os.RemoteException
|
|||||||
import android.util.Base64
|
import android.util.Base64
|
||||||
import androidx.compose.mutableStateOf
|
import androidx.compose.mutableStateOf
|
||||||
import androidx.core.content.edit
|
import androidx.core.content.edit
|
||||||
|
import com.geeksville.android.Logging
|
||||||
import com.geeksville.mesh.IMeshService
|
import com.geeksville.mesh.IMeshService
|
||||||
import com.geeksville.mesh.MeshProtos
|
import com.geeksville.mesh.MeshProtos
|
||||||
import com.geeksville.mesh.ui.getInitials
|
import com.geeksville.mesh.ui.getInitials
|
||||||
|
|
||||||
/// FIXME - figure out how to merge this staate with the AppStatus Model
|
/// 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
|
/// Kinda ugly - created in the activity but used from Compose - figure out if there is a cleaner way GIXME
|
||||||
// lateinit var googleSignInClient: GoogleSignInClient
|
// lateinit var googleSignInClient: GoogleSignInClient
|
||||||
@@ -59,7 +60,7 @@ object UIState {
|
|||||||
getInitials(ownerName)
|
getInitials(ownerName)
|
||||||
) // Note: we use ?. here because we might be running in the emulator
|
) // Note: we use ?. here because we might be running in the emulator
|
||||||
} catch (ex: RemoteException) {
|
} 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}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ class MeshService : Service(), Logging {
|
|||||||
}
|
}
|
||||||
|
|
||||||
locationSettingsResponse.addOnFailureListener { exception ->
|
locationSettingsResponse.addOnFailureListener { exception ->
|
||||||
error("Failed to listen to GPS")
|
errormsg("Failed to listen to GPS")
|
||||||
if (exception is ResolvableApiException) {
|
if (exception is ResolvableApiException) {
|
||||||
Exceptions.report(exception) // FIXME, not yet implemented, report failure to mothership
|
Exceptions.report(exception) // FIXME, not yet implemented, report failure to mothership
|
||||||
exceptionReporter {
|
exceptionReporter {
|
||||||
|
|||||||
@@ -298,7 +298,7 @@ class RadioInterfaceService : Service(), Logging {
|
|||||||
if (on) {
|
if (on) {
|
||||||
val address = getBondedDeviceAddress(this)
|
val address = getBondedDeviceAddress(this)
|
||||||
if (address == null)
|
if (address == null)
|
||||||
error("No bonded mesh radio, can't create service")
|
errormsg("No bonded mesh radio, can't create service")
|
||||||
else {
|
else {
|
||||||
// Note: this call does no comms, it just creates the device object (even if the
|
// Note: this call does no comms, it just creates the device object (even if the
|
||||||
// device is off/not connected)
|
// device is off/not connected)
|
||||||
@@ -316,7 +316,7 @@ class RadioInterfaceService : Service(), Logging {
|
|||||||
// more info
|
// more info
|
||||||
s.asyncConnect(true, ::onConnect, ::onDisconnect)
|
s.asyncConnect(true, ::onConnect, ::onDisconnect)
|
||||||
} else {
|
} else {
|
||||||
error("Bluetooth adapter not found, assuming running on the emulator!")
|
errormsg("Bluetooth adapter not found, assuming running on the emulator!")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (logSends)
|
if (logSends)
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ class SafeBluetooth(private val context: Context, private val device: BluetoothD
|
|||||||
|
|
||||||
fun restartBle() {
|
fun restartBle() {
|
||||||
GeeksvilleApplication.analytics.track("ble_restart") // record # of times we needed to use this nasty hack
|
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 =
|
val mgr =
|
||||||
context.getSystemService(Context.BLUETOOTH_SERVICE) as BluetoothManager
|
context.getSystemService(Context.BLUETOOTH_SERVICE) as BluetoothManager
|
||||||
val adp = mgr.adapter
|
val adp = mgr.adapter
|
||||||
|
|||||||
Reference in New Issue
Block a user