remove relayStatus() from jni

Making it a no-op as the only thing it did, tweaking the net status
indicator, isn't useful.
This commit is contained in:
Eric House 2017-12-27 14:42:15 -08:00
parent de691af7ca
commit 17f27a1b65
4 changed files with 1 additions and 43 deletions

View file

@ -387,32 +387,6 @@ public class CommsTransport implements TransportProcs,
return nSent;
}
public void relayStatus( CommsRelayState newState )
{
Log.i( TAG, "relayStatus called; state=%s", newState.toString() );
switch( newState ) {
case COMMS_RELAYSTATE_UNCONNECTED:
case COMMS_RELAYSTATE_DENIED:
case COMMS_RELAYSTATE_CONNECT_PENDING:
ConnStatusHandler.updateStatus( m_context, null,
CommsConnType.COMMS_CONN_RELAY,
false );
break;
case COMMS_RELAYSTATE_CONNECTED:
case COMMS_RELAYSTATE_RECONNECTED:
ConnStatusHandler.updateStatusOut( m_context, null,
CommsConnType.COMMS_CONN_RELAY,
true );
break;
case COMMS_RELAYSTATE_ALLCONNECTED:
ConnStatusHandler.updateStatusIn( m_context, null,
CommsConnType.COMMS_CONN_RELAY,
true );
break;
}
}
public void relayConnd( String room, int devOrder, boolean allHere,
int nMissing )
{

View file

@ -119,10 +119,6 @@ public class MultiMsgSink implements TransportProcs {
return nSent;
}
public void relayStatus( CommsRelayState newState )
{
}
public void relayErrorProc( XWRELAY_ERROR relayErr )
{
}

View file

@ -38,7 +38,6 @@ public interface TransportProcs {
, COMMS_RELAYSTATE_RECONNECTED
, COMMS_RELAYSTATE_ALLCONNECTED
};
void relayStatus( CommsRelayState newState );
void relayConnd( String room, int devOrder, boolean allHere, int nMissing );

View file

@ -95,19 +95,8 @@ and_xport_send( const XP_U8* buf, XP_U16 len, const XP_UCHAR* msgNo,
}
static void
and_xport_relayStatus( void* closure, CommsRelayState newState )
and_xport_relayStatus( void* XP_UNUSED(closure), CommsRelayState XP_UNUSED(newState) )
{
AndTransportProcs* aprocs = (AndTransportProcs*)closure;
if ( NULL != aprocs->jxport ) {
JNIEnv* env = ENVFORME( aprocs->ti );
const char* sig = "(L" PKG_PATH("jni/TransportProcs$CommsRelayState") ";)V";
jmethodID mid = getMethodID( env, aprocs->jxport, "relayStatus", sig );
jobject jenum = intToJEnum( env, newState,
PKG_PATH("jni/TransportProcs$CommsRelayState") );
(*env)->CallVoidMethod( env, aprocs->jxport, mid, jenum );
deleteLocalRef( env, jenum );
}
}
static void