go back to overriding onPause and onResume, but don't tear down the game unless isFinishing() returns true

This commit is contained in:
Eric House 2014-02-08 16:50:27 -08:00
parent 5e3c26d453
commit b56d990a04

View file

@ -593,26 +593,30 @@ public class BoardActivity extends XWActivity
} // onCreate
@Override
protected void onStop()
protected void onPause()
{
m_handler = null;
ConnStatusHandler.setHandler( null );
waitCloseGame( true );
super.onStop();
if ( isFinishing() ) {
m_handler = null;
ConnStatusHandler.setHandler( null );
waitCloseGame( true );
}
super.onPause();
}
@Override
protected void onStart()
protected void onResume()
{
super.onStart();
m_handler = new Handler();
m_blockingDlgID = BLOCKING_DLG_NONE;
super.onResume();
if ( null == m_handler ) {
m_handler = new Handler();
m_blockingDlgID = BLOCKING_DLG_NONE;
setKeepScreenOn();
setKeepScreenOn();
loadGame();
loadGame();
ConnStatusHandler.setHandler( this );
ConnStatusHandler.setHandler( this );
}
}
@Override