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 } // onCreate
@Override @Override
protected void onStop() protected void onPause()
{ {
m_handler = null; if ( isFinishing() ) {
ConnStatusHandler.setHandler( null ); m_handler = null;
waitCloseGame( true ); ConnStatusHandler.setHandler( null );
super.onStop(); waitCloseGame( true );
}
super.onPause();
} }
@Override @Override
protected void onStart() protected void onResume()
{ {
super.onStart(); super.onResume();
m_handler = new Handler(); if ( null == m_handler ) {
m_blockingDlgID = BLOCKING_DLG_NONE; m_handler = new Handler();
m_blockingDlgID = BLOCKING_DLG_NONE;
setKeepScreenOn(); setKeepScreenOn();
loadGame(); loadGame();
ConnStatusHandler.setHandler( this ); ConnStatusHandler.setHandler( this );
}
} }
@Override @Override