Revert "pass additional param into java world so don't show toast every time connect to relay"

This reverts commit e9615cb154.
This commit is contained in:
Eric House 2013-07-08 06:30:26 -07:00
parent bb68b25429
commit 008cce8f37
5 changed files with 16 additions and 22 deletions

View file

@ -112,12 +112,12 @@ and_xport_relayConnd( void* closure, XP_UCHAR* const room, XP_Bool reconnect,
AndTransportProcs* aprocs = (AndTransportProcs*)closure; AndTransportProcs* aprocs = (AndTransportProcs*)closure;
if ( NULL != aprocs->jxport ) { if ( NULL != aprocs->jxport ) {
JNIEnv* env = *aprocs->envp; JNIEnv* env = *aprocs->envp;
const char* sig = "(Ljava/lang/String;ZIZI)V"; const char* sig = "(Ljava/lang/String;IZI)V";
jmethodID mid = getMethodID( env, aprocs->jxport, "relayConnd", sig ); jmethodID mid = getMethodID( env, aprocs->jxport, "relayConnd", sig );
jstring str = (*env)->NewStringUTF( env, room ); jstring str = (*env)->NewStringUTF( env, room );
(*env)->CallVoidMethod( env, aprocs->jxport, mid, (*env)->CallVoidMethod( env, aprocs->jxport, mid,
str, reconnect, devOrder, allHere, nMissing ); str, devOrder, allHere, nMissing );
deleteLocalRef( env, str ); deleteLocalRef( env, str );
} }
} }

View file

@ -1030,18 +1030,15 @@ public class BoardActivity extends XWActivity
// TransportProcs.TPMsgHandler interface // TransportProcs.TPMsgHandler interface
////////////////////////////////////////////////// //////////////////////////////////////////////////
public void tpmRelayConnd( final String room, boolean isReconnect, public void tpmRelayConnd( final String room, final int devOrder,
final int devOrder, final boolean allHere, final boolean allHere, final int nMissing )
final int nMissing )
{ {
if ( !isReconnect ) {
post( new Runnable() { post( new Runnable() {
public void run() { public void run() {
handleConndMessage( room, devOrder, allHere, nMissing ); handleConndMessage( room, devOrder, allHere, nMissing );
} }
} ); } );
} }
}
public void tpmRelayErrorProc( TransportProcs.XWRELAY_ERROR relayErr ) public void tpmRelayErrorProc( TransportProcs.XWRELAY_ERROR relayErr )
{ {

View file

@ -435,11 +435,10 @@ public class CommsTransport implements TransportProcs,
} }
} }
public void relayConnd( String room, boolean isReconnect, int devOrder, public void relayConnd( String room, int devOrder, boolean allHere,
boolean allHere, int nMissing ) int nMissing )
{ {
m_tpHandler.tpmRelayConnd( room, isReconnect, devOrder, allHere, m_tpHandler.tpmRelayConnd( room, devOrder, allHere, nMissing );
nMissing );
} }
public void relayErrorProc( XWRELAY_ERROR relayErr ) public void relayErrorProc( XWRELAY_ERROR relayErr )

View file

@ -48,8 +48,8 @@ public class MultiMsgSink implements TransportProcs {
{ {
} }
public void relayConnd( String room, boolean isReconnect, int devOrder, public void relayConnd( String room, int devOrder, boolean allHere,
boolean allHere, int nMissing ) int nMissing )
{ {
} }

View file

@ -37,8 +37,7 @@ public interface TransportProcs {
}; };
void relayStatus( CommsRelayState newState ); void relayStatus( CommsRelayState newState );
void relayConnd( String room, boolean isReconnect, int devOrder, void relayConnd( String room, int devOrder, boolean allHere, int nMissing );
boolean allHere, int nMissing );
public static enum XWRELAY_ERROR { NONE public static enum XWRELAY_ERROR { NONE
,OLDFLAGS ,OLDFLAGS
@ -62,8 +61,7 @@ public interface TransportProcs {
boolean relayNoConnProc( byte[] buf, String relayID ); boolean relayNoConnProc( byte[] buf, String relayID );
public interface TPMsgHandler { public interface TPMsgHandler {
public void tpmRelayConnd( String room, boolean isReconnect, public void tpmRelayConnd( String room, int devOrder, boolean allHere,
int devOrder, boolean allHere,
int nMissing ); int nMissing );
public void tpmRelayErrorProc( XWRELAY_ERROR relayErr ); public void tpmRelayErrorProc( XWRELAY_ERROR relayErr );
} }