fix: handle `RemoteException` in `setConfig` and `setChannel`

pull/1270/head
andrekir 2024-09-24 07:44:25 -03:00
rodzic b53a5f2e17
commit e5b229e6ff
1 zmienionych plików z 10 dodań i 2 usunięć

Wyświetl plik

@ -507,11 +507,19 @@ class UIViewModel @Inject constructor(
// Set the radio config (also updates our saved copy in preferences)
fun setConfig(config: Config) {
meshService?.setConfig(config.toByteArray())
try {
meshService?.setConfig(config.toByteArray())
} catch (ex: RemoteException) {
errormsg("Set config error:", ex)
}
}
fun setChannel(channel: ChannelProtos.Channel) {
meshService?.setChannel(channel.toByteArray())
try {
meshService?.setChannel(channel.toByteArray())
} catch (ex: RemoteException) {
errormsg("Set channel error:", ex)
}
}
/**