Don't assert when don't have expected connType (likely as result of

race condition.  Just don't show the type in summary.  Likely fixes
once-seen assertion failure.
This commit is contained in:
Eric House 2012-01-17 18:48:33 -08:00
parent 7a90f71d41
commit 00575c6d4e

View file

@ -146,19 +146,19 @@ public class GameSummary {
String result = null;
if ( isRelayGame() ) {
Assert.assertTrue( CommsAddrRec.CommsConnType.COMMS_CONN_RELAY
== conType );
int fmtID;
if ( null == relayID || 0 == relayID.length() ) {
fmtID = R.string.summary_relay_conff;
} else if ( anyMissing() ) {
fmtID = R.string.summary_relay_waitf;
} else if ( gameOver ) {
fmtID = R.string.summary_relay_gameoverf;
} else {
fmtID = R.string.summary_relay_connf;
if ( CommsAddrRec.CommsConnType.COMMS_CONN_RELAY == conType ) {
int fmtID;
if ( null == relayID || 0 == relayID.length() ) {
fmtID = R.string.summary_relay_conff;
} else if ( anyMissing() ) {
fmtID = R.string.summary_relay_waitf;
} else if ( gameOver ) {
fmtID = R.string.summary_relay_gameoverf;
} else {
fmtID = R.string.summary_relay_connf;
}
result = String.format( m_context.getString(fmtID), roomName );
}
result = String.format( m_context.getString(fmtID), roomName );
}
return result;
}