mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-29 08:34:37 +01:00
unlock GameLock before launching BoardActivity -- to fix a deadlock.
Also do lock/unlock in onPause/onResume rather than onStart/Stop to hold the lock for a shorter time.
This commit is contained in:
parent
1b6d8ebed2
commit
2b28a4d27c
1 changed files with 8 additions and 13 deletions
|
@ -387,10 +387,10 @@ public class GameConfig extends XWActivity
|
|||
} // onCreate
|
||||
|
||||
@Override
|
||||
protected void onStart()
|
||||
protected void onResume()
|
||||
{
|
||||
super.onStart();
|
||||
|
||||
super.onResume();
|
||||
|
||||
int gamePtr = XwJNI.initJNI();
|
||||
m_giOrig = new CurGameInfo( this );
|
||||
// Lock in case we're going to config. We *could* re-get the
|
||||
|
@ -475,16 +475,16 @@ public class GameConfig extends XWActivity
|
|||
};
|
||||
check.setOnCheckedChangeListener( lstnr );
|
||||
Utils.setChecked( this, R.id.use_timer, m_gi.timerEnabled );
|
||||
} // onStart
|
||||
} // onResume
|
||||
|
||||
@Override
|
||||
protected void onStop()
|
||||
protected void onPause()
|
||||
{
|
||||
if ( null != m_gameLock ) {
|
||||
m_gameLock.unlock();
|
||||
m_gameLock = null;
|
||||
}
|
||||
super.onStop();
|
||||
super.onPause();
|
||||
}
|
||||
|
||||
// DeleteCallback interface
|
||||
|
@ -568,13 +568,6 @@ public class GameConfig extends XWActivity
|
|||
return consumed || super.onKeyDown( keyCode, event );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume()
|
||||
{
|
||||
configDictSpinner();
|
||||
super.onResume();
|
||||
}
|
||||
|
||||
private void loadPlayers()
|
||||
{
|
||||
m_playerLayout.removeAllViews();
|
||||
|
@ -916,6 +909,8 @@ public class GameConfig extends XWActivity
|
|||
private void launchGame()
|
||||
{
|
||||
if ( m_notNetworkedGame || m_car.ip_relay_invite.length() > 0 ) {
|
||||
m_gameLock.unlock();
|
||||
m_gameLock = null;
|
||||
GameUtils.launchGameAndFinish( this, m_path );
|
||||
} else {
|
||||
showOKOnlyDialog( R.string.no_empty_rooms );
|
||||
|
|
Loading…
Add table
Reference in a new issue