mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
never let getMyNodeInfo ever return null. fixes an autobug for device removal
This commit is contained in:
parent
5d9648f602
commit
cff90c5bd7
2 changed files with 5 additions and 2 deletions
|
|
@ -64,7 +64,8 @@ interface IMeshService {
|
|||
/// Users should not call this directly, only used internally by the MeshUtil activity
|
||||
void setDeviceAddress(String deviceAddr);
|
||||
|
||||
/// Get basic device hardware info about our connected radio
|
||||
/// Get basic device hardware info about our connected radio. Will never return NULL. Will throw
|
||||
/// RemoteException if no my node info is available
|
||||
MyNodeInfo getMyNodeInfo();
|
||||
|
||||
/// Start updating the radios firmware
|
||||
|
|
|
|||
|
|
@ -1488,7 +1488,9 @@ class MeshService : Service(), Logging {
|
|||
doFirmwareUpdate()
|
||||
}
|
||||
|
||||
override fun getMyNodeInfo(): MyNodeInfo? = this@MeshService.myNodeInfo
|
||||
override fun getMyNodeInfo(): MyNodeInfo = toRemoteExceptions {
|
||||
this@MeshService.myNodeInfo ?: throw RadioNotConnectedException("No MyNodeInfo")
|
||||
}
|
||||
|
||||
override fun getMyId() = toRemoteExceptions { myNodeID }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue