mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-31 19:57:06 +01:00
fix not sending ACK_INVITE
Logic error meant it was never sent. Now always send on receipt of a well-formed invitation, even if e.g. the recipient's missing a wordlist and the game can't be started immediately.
This commit is contained in:
parent
a23777bade
commit
bf06d4b4c2
2 changed files with 6 additions and 3 deletions
|
@ -485,7 +485,7 @@ public class SMSService extends XWService {
|
|||
}
|
||||
postEvent( MultiEvent.SMS_RECEIVE_OK );
|
||||
} else {
|
||||
Log.w( TAG, "receiveBuffer(): bogus or incomplete message from phone %s",
|
||||
Log.d( TAG, "receiveBuffer(): bogus or incomplete message from %s",
|
||||
senderPhone );
|
||||
}
|
||||
}
|
||||
|
@ -501,8 +501,8 @@ public class SMSService extends XWService {
|
|||
|
||||
private void makeForInvite( String phone, NetLaunchInfo nli )
|
||||
{
|
||||
if ( nli != null &&
|
||||
handleInvitation( nli, phone, DictFetchOwner.OWNER_SMS ) ) {
|
||||
if ( nli != null ) {
|
||||
handleInvitation( nli, phone, DictFetchOwner.OWNER_SMS );
|
||||
ackInvite( phone, nli.gameID() );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -89,6 +89,7 @@ abstract class XWService extends Service {
|
|||
|
||||
abstract void postNotification( String device, int gameID, long rowid );
|
||||
|
||||
// Return true if able to start game only
|
||||
protected boolean handleInvitation( NetLaunchInfo nli, String device,
|
||||
DictFetchOwner dfo )
|
||||
{
|
||||
|
@ -110,6 +111,7 @@ abstract class XWService extends Service {
|
|||
}
|
||||
|
||||
postNotification( device, nli.gameID(), rowid );
|
||||
success = true;
|
||||
} else {
|
||||
Intent intent = MultiService
|
||||
.makeMissingDictIntent( this, nli, dfo );
|
||||
|
@ -118,6 +120,7 @@ abstract class XWService extends Service {
|
|||
}
|
||||
}
|
||||
}
|
||||
Log.d( TAG, "handleInvitation() => %b", success );
|
||||
return success;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue