add logging of activity lifecycle methods -- and override a couple just

to do the logging before calling super().  These should go once I've
got the lifecycle stuff working.
This commit is contained in:
Andy2 2011-02-26 19:46:29 -08:00
parent ef074f2944
commit 9cc7cd0dc8
2 changed files with 21 additions and 3 deletions

View file

@ -40,6 +40,7 @@ public class XWActivity extends Activity {
protected void onCreate( Bundle savedInstanceState )
{
Utils.logf( "%s.onCreate()", getClass().getName() );
super.onCreate( savedInstanceState );
m_delegate = new DlgDelegate( this );
}
@ -47,6 +48,7 @@ public class XWActivity extends Activity {
@Override
protected void onStart()
{
Utils.logf( "%s.onStart()", getClass().getName() );
super.onStart();
DispatchNotify.SetRunning( this );
}
@ -54,8 +56,16 @@ public class XWActivity extends Activity {
@Override
protected void onStop()
{
super.onStop();
Utils.logf( "%s.onStop()", getClass().getName() );
DispatchNotify.ClearRunning( this );
super.onStop();
}
@Override
protected void onDestroy()
{
Utils.logf( "%s.onDestroy()", getClass().getName() );
super.onDestroy();
}
@Override

View file

@ -33,6 +33,7 @@ public class XWListActivity extends ListActivity {
@Override
protected void onCreate( Bundle savedInstanceState )
{
Utils.logf( "%s.onCreate()", getClass().getName() );
super.onCreate( savedInstanceState );
m_delegate = new DlgDelegate( this );
}
@ -40,7 +41,7 @@ public class XWListActivity extends ListActivity {
@Override
protected void onStart()
{
Utils.logf( "XWListActivity::onStart" );
Utils.logf( "%s.onStart", getClass().getName() );
super.onStart();
DispatchNotify.SetRunning( this );
}
@ -48,11 +49,18 @@ public class XWListActivity extends ListActivity {
@Override
protected void onStop()
{
Utils.logf( "XWListActivity::onStop" );
Utils.logf( "%s.onStop", getClass().getName() );
DispatchNotify.ClearRunning( this );
super.onStop();
}
@Override
protected void onDestroy()
{
Utils.logf( "%s.onDestroy", getClass().getName() );
super.onDestroy();
}
@Override
protected Dialog onCreateDialog( final int id )
{