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