log when we drop a message because two possible receiving games are open

This commit is contained in:
Eric House 2014-02-28 06:13:52 -08:00
parent 61080e1b62
commit 9a94663fb8

View file

@ -187,8 +187,10 @@ public class BoardActivity extends XWActivity
CommsAddrRec retAddr )
{
boolean delivered = false;
int size;
synchronized( s_this ) {
if ( 1 == s_this.size() ) {
size = s_this.size();
if ( 1 == size ) {
BoardActivity self = s_this.iterator().next();
Assert.assertNotNull( self.m_gi );
Assert.assertNotNull( self.m_jniThread );
@ -198,6 +200,10 @@ public class BoardActivity extends XWActivity
}
}
}
if ( 1 < s_this.size() ) {
noteSkip();
}
return delivered;
}
@ -210,8 +216,10 @@ public class BoardActivity extends XWActivity
{
boolean delivered = false;
Assert.assertNotNull( msgs );
int size;
synchronized( s_this ) {
if ( 1 == s_this.size() ) {
size = s_this.size();
if ( 1 == size ) {
BoardActivity self = s_this.iterator().next();
Assert.assertNotNull( self.m_gi );
Assert.assertNotNull( self.m_jniThread );
@ -224,6 +232,9 @@ public class BoardActivity extends XWActivity
}
}
}
if ( 1 < size ) {
noteSkip();
}
return delivered;
}
@ -2306,4 +2317,11 @@ public class BoardActivity extends XWActivity
return button;
}
private void noteSkip()
{
String msg = "BoardActivity.feedMessage[s](): skipped because "
+ "too many open Boards";
DbgUtils.logf(msg );
Utils.showToast( this, msg ); // probably don't want to ship this
}
} // class BoardActivity