manually bring in db71c4e4e2: force

resend_all() when opening game
This commit is contained in:
Eric House 2015-02-21 17:37:10 -08:00
parent 958ca38002
commit 825577a762

View file

@ -556,20 +556,20 @@ public class BoardDelegate extends DelegateBase
super.onPause();
}
@Override
protected void onStart()
{
super.onStart();
doResume( true );
}
@Override
protected void onResume()
{
super.onResume();
m_handler = new Handler();
m_blockingDlgID = DlgID.NONE;
setKeepScreenOn();
loadGame();
ConnStatusHandler.setHandler( this );
doResume( false );
}
@Override
protected void onDestroy()
{
@ -1806,7 +1806,23 @@ public class BoardDelegate extends DelegateBase
} );
}
private void loadGame()
private void doResume( boolean isStart )
{
boolean firstStart = null == m_handler;
if ( firstStart ) {
m_handler = new Handler();
m_blockingDlgID = DlgID.NONE;
}
loadGame( isStart );
if ( !isStart ) {
setKeepScreenOn();
ConnStatusHandler.setHandler( this );
}
}
private void loadGame( boolean isStart )
{
if ( 0 == m_jniGamePtr ) {
try {
@ -1940,7 +1956,7 @@ public class BoardDelegate extends DelegateBase
if ( null != m_xport ) {
warnIfNoTransport();
trySendChats();
tickle();
tickle( isStart );
tryInvites();
}
}
@ -1952,7 +1968,7 @@ public class BoardDelegate extends DelegateBase
} // loadGame
@SuppressWarnings("fallthrough")
private void tickle()
private void tickle( boolean force )
{
switch( m_connType ) {
case COMMS_CONN_BT:
@ -1964,7 +1980,7 @@ public class BoardDelegate extends DelegateBase
case COMMS_CONN_SMS:
// Let other know I'm here
// DbgUtils.logf( "tickle calling comms_resendAll" );
m_jniThread.handle( JNIThread.JNICmd.CMD_RESEND, false, true );
m_jniThread.handle( JNIThread.JNICmd.CMD_RESEND, force, true );
break;
default:
DbgUtils.logf( "tickle: unexpected type %s",