diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BoardDelegate.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BoardDelegate.java index 1bdd0ddc2..e99bc0e16 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BoardDelegate.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BoardDelegate.java @@ -1420,69 +1420,10 @@ public class BoardDelegate extends DelegateBase ////////////////////////////////////////////////// // TransportProcs.TPMsgHandler interface ////////////////////////////////////////////////// - - @Override - public void tpmRelayErrorProc( TransportProcs.XWRELAY_ERROR relayErr ) - { - int strID = -1; - DlgID dlgID = DlgID.NONE; - boolean doToast = false; - Object[] params = null; - - switch ( relayErr ) { - case TOO_MANY: - strID = R.string.msg_too_many; - dlgID = DlgID.DLG_OKONLY; - break; - case NO_ROOM: - strID = R.string.msg_no_room; - dlgID = DlgID.DLG_RETRY; - break; - case DUP_ROOM: - strID = R.string.msg_dup_room; - dlgID = DlgID.DLG_OKONLY; - break; - case LOST_OTHER: - case OTHER_DISCON: - strID = R.string.msg_lost_other; - doToast = true; - break; - - case DEADGAME: - case DELETED: - postDeleteOnce( null ); - break; - - case OLDFLAGS: - case BADPROTO: - case RELAYBUSY: - case SHUTDOWN: - case TIMEOUT: - case HEART_YOU: - case HEART_OTHER: - break; - } - - if ( doToast ) { - showToast( strID ); - } else if ( dlgID != DlgID.NONE ) { - final DlgID dlgIDf = dlgID; - final Object[] paramsF = null == params - ? new Object[] {R.string.relay_alert, getString( strID )} - : params; - post( new Runnable() { - @Override - public void run() { - showDialogFragment( dlgIDf, paramsF ); - } - }); - } - } - @Override public void tpmCountChanged( final int newCount ) { - Log.d( TAG, "tpmCountChanged(newCount=%d)", newCount ); + // Log.d( TAG, "tpmCountChanged(newCount=%d)", newCount ); ConnStatusHandler.updateMoveCount( m_activity, newCount ); final GameOverAlert goAlert = mGameOverAlert; 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 7801a6ba1..5f157c54f 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 @@ -391,26 +391,6 @@ public class CommsTransport implements TransportProcs, return nSent; } - @Override - public void relayConnd( String room, int devOrder, boolean allHere, - int nMissing ) - { - // m_tpHandler.tpmRelayConnd( room, devOrder, allHere, nMissing ); - } - - @Override - public void relayErrorProc( XWRELAY_ERROR relayErr ) - { - m_tpHandler.tpmRelayErrorProc( relayErr ); - } - - @Override - public boolean relayNoConnProc( byte[] buf, String msgID, String relayID ) - { - RelayService.logGoneFail( TAG, 1 ); - return false; - } - @Override public void countChanged( int newCount ) { 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 f120e4000..45cdc9fe9 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 @@ -136,27 +136,9 @@ public class MultiMsgSink implements TransportProcs { return nSent; } - @Override - public void relayErrorProc( XWRELAY_ERROR relayErr ) - { - } - - @Override - public void relayConnd( String room, int devOrder, boolean allHere, - int nMissing ) - { - } - @Override public void countChanged( int newCount ) { Log.d( TAG, "countChanged(new=%d); dropping", newCount ); } - - @Override - public boolean relayNoConnProc( byte[] buf, String msgNo, String relayID ) - { - RelayService.logGoneFail( TAG, 2 ); - return false; - } } 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 6db4b7c3c..8b381ab41 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 @@ -31,43 +31,9 @@ public interface TransportProcs { int transportSend( byte[] buf, String msgNo, CommsAddrRec addr, CommsConnType conType, int gameID ); - enum CommsRelayState { COMMS_RELAYSTATE_UNCONNECTED - , COMMS_RELAYSTATE_DENIED - , COMMS_RELAYSTATE_CONNECT_PENDING - , COMMS_RELAYSTATE_CONNECTED - , COMMS_RELAYSTATE_RECONNECTED - , COMMS_RELAYSTATE_ALLCONNECTED - }; - - void relayConnd( String room, int devOrder, boolean allHere, int nMissing ); - void countChanged( int newCount ); - public static enum XWRELAY_ERROR { NONE - ,OLDFLAGS - ,BADPROTO - ,RELAYBUSY - ,SHUTDOWN - ,TIMEOUT - ,HEART_YOU - ,HEART_OTHER - ,LOST_OTHER - ,OTHER_DISCON - ,NO_ROOM - ,DUP_ROOM - ,TOO_MANY - ,DELETED - ,NORECONN - ,DEADGAME - }; - void relayErrorProc( XWRELAY_ERROR relayErr ); - - boolean relayNoConnProc( byte[] buf, String msgNo, String relayID ); - public interface TPMsgHandler { - // public void tpmRelayConnd( String room, int devOrder, boolean allHere, - // int nMissing ); - public void tpmRelayErrorProc( XWRELAY_ERROR relayErr ); public void tpmCountChanged( int newCount ); } } diff --git a/xwords4/android/jni/Android.mk b/xwords4/android/jni/Android.mk index 1bcc69367..337233917 100644 --- a/xwords4/android/jni/Android.mk +++ b/xwords4/android/jni/Android.mk @@ -15,7 +15,6 @@ ifeq ($(BUILD_TARGET),debug) endif LOCAL_DEFINES += \ $(LOCAL_DEBUG) \ - -DXWFEATURE_RELAY \ -DXWFEATURE_BLUETOOTH \ -DXWFEATURE_SMS \ -DXWFEATURE_P2P \