mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-04 23:02:02 +01:00
oops: MultiEventListener installation got dropped with the move to
activity delegates; fix
This commit is contained in:
parent
1d4d3a7a32
commit
ddc4ab9844
6 changed files with 15 additions and 3 deletions
|
@ -543,6 +543,7 @@ public class BoardDelegate extends DelegateBase
|
||||||
m_handler = null;
|
m_handler = null;
|
||||||
ConnStatusHandler.setHandler( null );
|
ConnStatusHandler.setHandler( null );
|
||||||
waitCloseGame( true );
|
waitCloseGame( true );
|
||||||
|
super.onPause();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -74,8 +74,6 @@ public class DelegateBase implements DlgDelegate.DlgClickNotify,
|
||||||
public boolean onPrepareOptionsMenu( Menu menu ) { return false; }
|
public boolean onPrepareOptionsMenu( Menu menu ) { return false; }
|
||||||
public boolean onOptionsItemSelected( MenuItem item ) { return false; }
|
public boolean onOptionsItemSelected( MenuItem item ) { return false; }
|
||||||
protected void onStart() {}
|
protected void onStart() {}
|
||||||
protected void onResume() {}
|
|
||||||
protected void onPause() {}
|
|
||||||
protected void onStop() {}
|
protected void onStop() {}
|
||||||
protected void onDestroy() {}
|
protected void onDestroy() {}
|
||||||
protected void onWindowFocusChanged( boolean hasFocus ) {}
|
protected void onWindowFocusChanged( boolean hasFocus ) {}
|
||||||
|
@ -84,6 +82,16 @@ public class DelegateBase implements DlgDelegate.DlgClickNotify,
|
||||||
protected void onActivityResult( int requestCode, int resultCode,
|
protected void onActivityResult( int requestCode, int resultCode,
|
||||||
Intent data ) {}
|
Intent data ) {}
|
||||||
|
|
||||||
|
protected void onResume()
|
||||||
|
{
|
||||||
|
XWService.setListener( this );
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void onPause()
|
||||||
|
{
|
||||||
|
XWService.setListener( null );
|
||||||
|
}
|
||||||
|
|
||||||
public boolean onCreateOptionsMenu( Menu menu, MenuInflater inflater )
|
public boolean onCreateOptionsMenu( Menu menu, MenuInflater inflater )
|
||||||
{
|
{
|
||||||
boolean handled = 0 < m_optionsMenuID;
|
boolean handled = 0 < m_optionsMenuID;
|
||||||
|
@ -436,5 +444,4 @@ public class DelegateBase implements DlgDelegate.DlgClickNotify,
|
||||||
{
|
{
|
||||||
Assert.fail();
|
Assert.fail();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -235,6 +235,7 @@ public class DictBrowseDelegate extends ListDelegateBase
|
||||||
DBUtils.dictsSetOffset( m_activity, m_name, m_loc, m_browseState );
|
DBUtils.dictsSetOffset( m_activity, m_name, m_loc, m_browseState );
|
||||||
m_browseState = null;
|
m_browseState = null;
|
||||||
}
|
}
|
||||||
|
super.onPause();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -446,6 +446,7 @@ public class GameConfigDelegate extends DelegateBase
|
||||||
m_gameLock = null;
|
m_gameLock = null;
|
||||||
}
|
}
|
||||||
m_giOrig = null; // flag for onStart and onResume
|
m_giOrig = null; // flag for onStart and onResume
|
||||||
|
super.onPause();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void onSaveInstanceState( Bundle outState )
|
protected void onSaveInstanceState( Bundle outState )
|
||||||
|
|
|
@ -166,6 +166,7 @@ public class PrefsDelegate extends DelegateBase
|
||||||
protected void onPause()
|
protected void onPause()
|
||||||
{
|
{
|
||||||
getSharedPreferences().unregisterOnSharedPreferenceChangeListener(this);
|
getSharedPreferences().unregisterOnSharedPreferenceChangeListener(this);
|
||||||
|
super.onPause();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -97,6 +97,7 @@ public class RelayGameDelegate extends DelegateBase
|
||||||
m_gameLock.unlock();
|
m_gameLock.unlock();
|
||||||
m_gameLock = null;
|
m_gameLock = null;
|
||||||
}
|
}
|
||||||
|
super.onPause();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick( View view )
|
public void onClick( View view )
|
||||||
|
|
Loading…
Reference in a new issue