kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
fix: handle `RemoteException` in `setConfig` and `setChannel`
rodzic
b53a5f2e17
commit
e5b229e6ff
|
@ -507,11 +507,19 @@ class UIViewModel @Inject constructor(
|
||||||
|
|
||||||
// Set the radio config (also updates our saved copy in preferences)
|
// Set the radio config (also updates our saved copy in preferences)
|
||||||
fun setConfig(config: Config) {
|
fun setConfig(config: Config) {
|
||||||
|
try {
|
||||||
meshService?.setConfig(config.toByteArray())
|
meshService?.setConfig(config.toByteArray())
|
||||||
|
} catch (ex: RemoteException) {
|
||||||
|
errormsg("Set config error:", ex)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setChannel(channel: ChannelProtos.Channel) {
|
fun setChannel(channel: ChannelProtos.Channel) {
|
||||||
|
try {
|
||||||
meshService?.setChannel(channel.toByteArray())
|
meshService?.setChannel(channel.toByteArray())
|
||||||
|
} catch (ex: RemoteException) {
|
||||||
|
errormsg("Set channel error:", ex)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Ładowanie…
Reference in New Issue