cleanup: chat delegate no longer "returns" a result

This commit is contained in:
Eric House 2016-07-20 09:30:01 -07:00
parent 5b4e04bc5a
commit c57b5a232f
3 changed files with 6 additions and 17 deletions

View file

@ -702,15 +702,6 @@ public class BoardDelegate extends DelegateBase
if ( Activity.RESULT_CANCELED != resultCode ) {
InviteMeans missingMeans = null;
switch ( requestCode ) {
case CHAT_REQUEST:
if ( BuildConstants.CHAT_SUPPORTED ) {
String msg = data.getStringExtra( INTENT_KEY_CHAT );
if ( null != msg && msg.length() > 0 ) {
m_pendingChats.add( msg );
trySendChats();
}
}
break;
case BT_INVITE_RESULT:
missingMeans = InviteMeans.BLUETOOTH;
break;
@ -2334,8 +2325,8 @@ public class BoardDelegate extends DelegateBase
int curPlayer = XwJNI.board_getSelPlayer( m_jniGamePtr );
String[] names = m_gi.playerNames();
boolean[] locs = m_gi.playersLocal(); // to convert old histories
ChatDelegate.startForResult( getDelegator(), RequestCode.CHAT_REQUEST,
m_rowid, curPlayer, names, locs );
ChatDelegate.start( getDelegator(), m_rowid, curPlayer,
names, locs );
}
}

View file

@ -252,10 +252,9 @@ public class ChatDelegate extends DelegateBase {
return handled;
}
public static void startForResult( Delegator delegator,
RequestCode requestCode,
long rowID, int curPlayer,
String[] names, boolean[] locs )
public static void start( Delegator delegator,
long rowID, int curPlayer,
String[] names, boolean[] locs )
{
Assert.assertFalse( -1 == curPlayer );
Bundle bundle = new Bundle();
@ -270,7 +269,7 @@ public class ChatDelegate extends DelegateBase {
Activity activity = delegator.getActivity();
Intent intent = new Intent( activity, ChatActivity.class );
intent.putExtras( bundle );
activity.startActivityForResult( intent, requestCode.ordinal() );
activity.startActivity( intent );
}
}
}

View file

@ -25,7 +25,6 @@ public enum RequestCode {
__UNUSED,
// BoardDelegate
CHAT_REQUEST,
BT_INVITE_RESULT,
SMS_INVITE_RESULT,
RELAY_INVITE_RESULT,