set and clear dbchange listener in onCreate and onDestroy rather than

onStart and onPause so it'll get called when not in front too.  Not
sure why this worked before the GameLock change....
This commit is contained in:
Andy2 2011-03-02 06:48:14 -08:00
parent c144503630
commit 467e999509

View file

@ -197,6 +197,8 @@ public class GamesList extends XWListActivity
NetUtils.informOfDeaths( this );
startFirstHasDict( getIntent() );
DBUtils.setDBChangeListener( this );
} // onCreate
@Override
@ -215,7 +217,6 @@ public class GamesList extends XWListActivity
{
super.onStart();
DispatchNotify.SetRelayIDsHandler( this );
DBUtils.setDBChangeListener( this );
// TelephonyManager mgr =
// (TelephonyManager)getSystemService( Context.TELEPHONY_SERVICE );
@ -231,12 +232,18 @@ public class GamesList extends XWListActivity
// (TelephonyManager)getSystemService( Context.TELEPHONY_SERVICE );
// mgr.listen( m_phoneStateListener, PhoneStateListener.LISTEN_NONE );
// m_phoneStateListener = null;
DBUtils.clearDBChangeListener( this );
DispatchNotify.SetRelayIDsHandler( null );
super.onStop();
}
@Override
protected void onDestroy()
{
DBUtils.clearDBChangeListener( this );
super.onDestroy();
}
// DispatchNotify.HandleRelaysIface interface
public void HandleRelaysIDs( final String[] relayIDs )
{