don't send packets if SMS play disabled

This commit is contained in:
Eric House 2012-07-26 07:21:16 -07:00
parent 1abba7e560
commit e70fbda502

View file

@ -132,12 +132,18 @@ public class SMSService extends Service {
public static int sendPacket( Context context, String phone,
int gameID, byte[] binmsg )
{
int nSent = -1;
if ( XWPrefs.getSMSEnabled( context ) ) {
Intent intent = getIntentTo( context, SEND );
intent.putExtra( PHONE, phone );
intent.putExtra( GAMEID, gameID );
intent.putExtra( BINBUFFER, binmsg );
context.startService( intent );
return binmsg.length;
nSent = binmsg.length;
} else {
DbgUtils.logf( "sendPacket: dropping because SMS disabled" );
}
return nSent;
}
public static void gameDied( Context context, int gameID, String phone )