mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-22 07:28:16 +01:00
send mqtt game-gone when game deleted
Receiver only does anything if the game's open. This could change....
This commit is contained in:
parent
8bc956491b
commit
210b0bcbcb
2 changed files with 9 additions and 3 deletions
|
@ -1310,7 +1310,7 @@ public class GameUtils {
|
|||
WiDirService.gameDied( addr.p2p_addr, gameID );
|
||||
break;
|
||||
case COMMS_CONN_MQTT:
|
||||
MQTTUtils.gameDied( addr.mqtt_devID, gameID );
|
||||
MQTTUtils.gameDied( context, addr.mqtt_devID, gameID );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -473,9 +473,15 @@ public class MQTTUtils extends Thread implements IMqttActionListener, MqttCallba
|
|||
}
|
||||
}
|
||||
|
||||
public static void gameDied( String devID, int gameID )
|
||||
public static void gameDied( Context context, String devID, int gameID )
|
||||
{
|
||||
Log.e( TAG, "gameDied() not handled" );
|
||||
if ( BuildConfig.DO_MQTT_GAME_GONE ) {
|
||||
String[] topic = { devID };
|
||||
byte[] packet = XwJNI.dvc_makeMQTTNoSuchGame( gameID, topic );
|
||||
addToSendQueue( context, topic[0], packet );
|
||||
} else {
|
||||
Log.e( TAG, "gameDied() not handled" ); // fix me
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue