oops: MultiEventListener installation got dropped with the move to

activity delegates; fix
This commit is contained in:
Eric House 2014-09-05 21:12:35 -07:00
parent 1d4d3a7a32
commit ddc4ab9844
6 changed files with 15 additions and 3 deletions

View file

@ -543,6 +543,7 @@ public class BoardDelegate extends DelegateBase
m_handler = null;
ConnStatusHandler.setHandler( null );
waitCloseGame( true );
super.onPause();
}
@Override

View file

@ -74,8 +74,6 @@ public class DelegateBase implements DlgDelegate.DlgClickNotify,
public boolean onPrepareOptionsMenu( Menu menu ) { return false; }
public boolean onOptionsItemSelected( MenuItem item ) { return false; }
protected void onStart() {}
protected void onResume() {}
protected void onPause() {}
protected void onStop() {}
protected void onDestroy() {}
protected void onWindowFocusChanged( boolean hasFocus ) {}
@ -84,6 +82,16 @@ public class DelegateBase implements DlgDelegate.DlgClickNotify,
protected void onActivityResult( int requestCode, int resultCode,
Intent data ) {}
protected void onResume()
{
XWService.setListener( this );
}
protected void onPause()
{
XWService.setListener( null );
}
public boolean onCreateOptionsMenu( Menu menu, MenuInflater inflater )
{
boolean handled = 0 < m_optionsMenuID;
@ -436,5 +444,4 @@ public class DelegateBase implements DlgDelegate.DlgClickNotify,
{
Assert.fail();
}
}

View file

@ -235,6 +235,7 @@ public class DictBrowseDelegate extends ListDelegateBase
DBUtils.dictsSetOffset( m_activity, m_name, m_loc, m_browseState );
m_browseState = null;
}
super.onPause();
}
@Override

View file

@ -446,6 +446,7 @@ public class GameConfigDelegate extends DelegateBase
m_gameLock = null;
}
m_giOrig = null; // flag for onStart and onResume
super.onPause();
}
protected void onSaveInstanceState( Bundle outState )

View file

@ -166,6 +166,7 @@ public class PrefsDelegate extends DelegateBase
protected void onPause()
{
getSharedPreferences().unregisterOnSharedPreferenceChangeListener(this);
super.onPause();
}
@Override

View file

@ -97,6 +97,7 @@ public class RelayGameDelegate extends DelegateBase
m_gameLock.unlock();
m_gameLock = null;
}
super.onPause();
}
public void onClick( View view )