mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-15 15:41:24 +01:00
fix SMS games not having role/connection status messages. Use same
for BT and SMS, and show different messages for host and guest.
This commit is contained in:
parent
30e2057496
commit
7b9e835722
2 changed files with 15 additions and 9 deletions
|
@ -1844,9 +1844,10 @@
|
|||
<string name="scan_progress">Scanning for Crosswords on paired devices</string>
|
||||
<string name="invite_progress">Sending new game info...</string>
|
||||
|
||||
<string name="summary_bt_wait">Not yet connected</string>
|
||||
<string name="summary_bt_gameover">Game over</string>
|
||||
<string name="summary_bt_conn">Game in play</string>
|
||||
<string name="summary_wait_host">Waiting for connection[s]</string>
|
||||
<string name="summary_wait_guest">Unconnected</string>
|
||||
<string name="summary_gameover">Game over</string>
|
||||
<string name="summary_conn">Game in play</string>
|
||||
<string name="new_bt_title">New game via Bluetooth</string>
|
||||
<string name="new_bt_bodyf">Paired device %s has invited you to
|
||||
play</string>
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.eehouse.android.xw4.R;
|
|||
import org.eehouse.android.xw4.Utils;
|
||||
import org.eehouse.android.xw4.DbgUtils;
|
||||
import org.eehouse.android.xw4.jni.CommsAddrRec.CommsConnType;
|
||||
|
||||
import org.eehouse.android.xw4.jni.CurGameInfo.DeviceRole;
|
||||
|
||||
/** Info we want to access when the game's closed that's not available
|
||||
* in CurGameInfo
|
||||
|
@ -59,7 +59,7 @@ public class GameSummary {
|
|||
public String[] remoteBTAddrs;
|
||||
|
||||
public int dictLang;
|
||||
public CurGameInfo.DeviceRole serverRole;
|
||||
public DeviceRole serverRole;
|
||||
|
||||
private int m_giFlags;
|
||||
private String m_playersSummary;
|
||||
|
@ -183,12 +183,17 @@ public class GameSummary {
|
|||
result = String.format( m_context.getString(fmtID), roomName );
|
||||
break;
|
||||
case COMMS_CONN_BT:
|
||||
case COMMS_CONN_SMS:
|
||||
if ( anyMissing() ) {
|
||||
fmtID = R.string.summary_bt_wait;
|
||||
if ( DeviceRole.SERVER_ISSERVER == serverRole ) {
|
||||
fmtID = R.string.summary_wait_host;
|
||||
} else {
|
||||
fmtID = R.string.summary_wait_guest;
|
||||
}
|
||||
} else if ( gameOver ) {
|
||||
fmtID = R.string.summary_bt_gameover;
|
||||
fmtID = R.string.summary_gameover;
|
||||
} else {
|
||||
fmtID = R.string.summary_bt_conn;
|
||||
fmtID = R.string.summary_conn;
|
||||
}
|
||||
result = m_context.getString( fmtID );
|
||||
break;
|
||||
|
@ -201,7 +206,7 @@ public class GameSummary {
|
|||
{
|
||||
// This definition will expand as other transports are added
|
||||
return ( null != conType
|
||||
&& serverRole != CurGameInfo.DeviceRole.SERVER_STANDALONE );
|
||||
&& serverRole != DeviceRole.SERVER_STANDALONE );
|
||||
}
|
||||
|
||||
private boolean isLocal( int indx ) {
|
||||
|
|
Loading…
Reference in a new issue