mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-03 23:04:08 +01:00
parent
958ca38002
commit
825577a762
1 changed files with 29 additions and 13 deletions
|
@ -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",
|
||||||
|
|
Loading…
Reference in a new issue