mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-12 08:47:50 +01:00
don't send packets if SMS play disabled
This commit is contained in:
parent
1abba7e560
commit
e70fbda502
1 changed files with 12 additions and 6 deletions
|
@ -132,12 +132,18 @@ public class SMSService extends Service {
|
||||||
public static int sendPacket( Context context, String phone,
|
public static int sendPacket( Context context, String phone,
|
||||||
int gameID, byte[] binmsg )
|
int gameID, byte[] binmsg )
|
||||||
{
|
{
|
||||||
Intent intent = getIntentTo( context, SEND );
|
int nSent = -1;
|
||||||
intent.putExtra( PHONE, phone );
|
if ( XWPrefs.getSMSEnabled( context ) ) {
|
||||||
intent.putExtra( GAMEID, gameID );
|
Intent intent = getIntentTo( context, SEND );
|
||||||
intent.putExtra( BINBUFFER, binmsg );
|
intent.putExtra( PHONE, phone );
|
||||||
context.startService( intent );
|
intent.putExtra( GAMEID, gameID );
|
||||||
return binmsg.length;
|
intent.putExtra( BINBUFFER, binmsg );
|
||||||
|
context.startService( intent );
|
||||||
|
nSent = binmsg.length;
|
||||||
|
} else {
|
||||||
|
DbgUtils.logf( "sendPacket: dropping because SMS disabled" );
|
||||||
|
}
|
||||||
|
return nSent;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void gameDied( Context context, int gameID, String phone )
|
public static void gameDied( Context context, int gameID, String phone )
|
||||||
|
|
Loading…
Add table
Reference in a new issue