From 17f27a1b65fc4fc1e6d62e5aab80cce5bc5c2e8d Mon Sep 17 00:00:00 2001 From: Eric House Date: Wed, 27 Dec 2017 14:42:15 -0800 Subject: [PATCH] remove relayStatus() from jni Making it a no-op as the only thing it did, tweaking the net status indicator, isn't useful. --- .../eehouse/android/xw4/CommsTransport.java | 26 ------------------- .../org/eehouse/android/xw4/MultiMsgSink.java | 4 --- .../android/xw4/jni/TransportProcs.java | 1 - xwords4/android/jni/xportwrapper.c | 13 +--------- 4 files changed, 1 insertion(+), 43 deletions(-) diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/CommsTransport.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/CommsTransport.java index 59830c635..4c51b9af5 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/CommsTransport.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/CommsTransport.java @@ -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 ) { diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/MultiMsgSink.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/MultiMsgSink.java index 01b6ed72c..0a08833e2 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/MultiMsgSink.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/MultiMsgSink.java @@ -119,10 +119,6 @@ public class MultiMsgSink implements TransportProcs { return nSent; } - public void relayStatus( CommsRelayState newState ) - { - } - public void relayErrorProc( XWRELAY_ERROR relayErr ) { } diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/jni/TransportProcs.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/jni/TransportProcs.java index 5d3f381a4..ce1a31ea8 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/jni/TransportProcs.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/jni/TransportProcs.java @@ -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 ); diff --git a/xwords4/android/jni/xportwrapper.c b/xwords4/android/jni/xportwrapper.c index 375069949..8071aead2 100644 --- a/xwords4/android/jni/xportwrapper.c +++ b/xwords4/android/jni/xportwrapper.c @@ -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