mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-12 08:47:50 +01:00
cleanup (no behavior change)
This commit is contained in:
parent
bfad324bb4
commit
f2322d7e81
1 changed files with 15 additions and 15 deletions
|
@ -182,20 +182,20 @@ public class SMSService extends XWService {
|
||||||
public static void handleFrom( Context context, byte[] buffer,
|
public static void handleFrom( Context context, byte[] buffer,
|
||||||
String phone )
|
String phone )
|
||||||
{
|
{
|
||||||
Intent intent = getIntentTo( context, SMSAction.HANDLEDATA );
|
Intent intent = getIntentTo( context, SMSAction.HANDLEDATA )
|
||||||
intent.putExtra( BUFFER, buffer );
|
.putExtra( BUFFER, buffer )
|
||||||
intent.putExtra( PHONE, phone );
|
.putExtra( PHONE, phone );
|
||||||
startService( context, intent );
|
startService( context, intent );
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void inviteRemote( Context context, String phone,
|
public static void inviteRemote( Context context, String phone,
|
||||||
NetLaunchInfo nli )
|
NetLaunchInfo nli )
|
||||||
{
|
{
|
||||||
Intent intent = getIntentTo( context, SMSAction.INVITE );
|
|
||||||
intent.putExtra( PHONE, phone );
|
|
||||||
Log.w( TAG, "inviteRemote(%s, '%s')", phone, nli );
|
Log.w( TAG, "inviteRemote(%s, '%s')", phone, nli );
|
||||||
byte[] data = nli.asByteArray();
|
byte[] data = nli.asByteArray();
|
||||||
intent.putExtra( GAMEDATA_BA, data );
|
Intent intent = getIntentTo( context, SMSAction.INVITE )
|
||||||
|
.putExtra( PHONE, phone )
|
||||||
|
.putExtra( GAMEDATA_BA, data );
|
||||||
startService( context, intent );
|
startService( context, intent );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,10 +204,10 @@ public class SMSService extends XWService {
|
||||||
{
|
{
|
||||||
int nSent = -1;
|
int nSent = -1;
|
||||||
if ( XWPrefs.getSMSEnabled( context ) ) {
|
if ( XWPrefs.getSMSEnabled( context ) ) {
|
||||||
Intent intent = getIntentTo( context, SMSAction.SEND );
|
Intent intent = getIntentTo( context, SMSAction.SEND )
|
||||||
intent.putExtra( PHONE, phone );
|
.putExtra( PHONE, phone )
|
||||||
intent.putExtra( MultiService.GAMEID, gameID );
|
.putExtra( MultiService.GAMEID, gameID )
|
||||||
intent.putExtra( BINBUFFER, binmsg );
|
.putExtra( BINBUFFER, binmsg );
|
||||||
startService( context, intent );
|
startService( context, intent );
|
||||||
nSent = binmsg.length;
|
nSent = binmsg.length;
|
||||||
} else {
|
} else {
|
||||||
|
@ -218,9 +218,9 @@ public class SMSService extends XWService {
|
||||||
|
|
||||||
public static void gameDied( Context context, int gameID, String phone )
|
public static void gameDied( Context context, int gameID, String phone )
|
||||||
{
|
{
|
||||||
Intent intent = getIntentTo( context, SMSAction.REMOVE );
|
Intent intent = getIntentTo( context, SMSAction.REMOVE )
|
||||||
intent.putExtra( PHONE, phone );
|
.putExtra( PHONE, phone )
|
||||||
intent.putExtra( MultiService.GAMEID, gameID );
|
.putExtra( MultiService.GAMEID, gameID );
|
||||||
startService( context, intent );
|
startService( context, intent );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -264,8 +264,8 @@ public class SMSService extends XWService {
|
||||||
|
|
||||||
private static Intent getIntentTo( Context context, SMSAction cmd )
|
private static Intent getIntentTo( Context context, SMSAction cmd )
|
||||||
{
|
{
|
||||||
Intent intent = new Intent( context, SMSService.class );
|
Intent intent = new Intent( context, SMSService.class )
|
||||||
intent.putExtra( CMD_STR, cmd.ordinal() );
|
.putExtra( CMD_STR, cmd.ordinal() );
|
||||||
return intent;
|
return intent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue