fix assertion: return a f*ing sink

Messed this up in February apparently.
This commit is contained in:
Eric House 2018-07-19 06:07:26 -07:00
parent b0cf3a795c
commit 7cb00b6266
3 changed files with 14 additions and 2 deletions

View file

@ -1106,11 +1106,17 @@ public class BTService extends XWService {
postEvent( MultiEvent.BT_GAME_CREATED, rowid );
}
@Override
MultiMsgSink getSink( long rowid )
{
return m_btMsgSink;
}
private BTCmd makeOrNotify( NetLaunchInfo nli, String btName,
String btAddr )
{
BTCmd result;
if ( handleInvitation( nli, btName, DictFetchOwner.OWNER_BT ) ) {
if ( handleInvitation( nli, btName, DictFetchOwner.OWNER_BT ) ) { // here
result = BTCmd.INVITE_ACCPT;
} else {
result = BTCmd.INVITE_DUP_INVITE; // dupe of rematch

View file

@ -774,6 +774,12 @@ public class WiDirService extends XWService {
Log.e( TAG, "postNotification() doing nothing" );
}
@Override
MultiMsgSink getSink( long rowid )
{
return m_sink;
}
private void handleGameGone( Intent intent )
{
int gameID = intent.getIntExtra( KEY_GAMEID, 0 );

View file

@ -130,7 +130,7 @@ abstract class XWService extends Service {
}
// Meant to be overridden
protected MultiMsgSink getSink( long rowid ) { Assert.fail(); return null; }
abstract MultiMsgSink getSink( long rowid );
protected ReceiveResult receiveMessage( Context context, int gameID,
MultiMsgSink sink, byte[] msg,