bug 574412 - Add Logging to android life cycle callbacks r=mwu

This commit is contained in:
Brad Lassey 2010-06-24 15:00:42 -04:00
Родитель b252dd567f
Коммит b05c9d3e71
1 изменённых файлов: 20 добавлений и 2 удалений

Просмотреть файл

@ -1,5 +1,4 @@
/* -*- Mode: Java; tab-width: 20; indent-tabs-mode: nil; -*-
* ***** BEGIN LICENSE BLOCK *****
/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-/ * ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
@ -97,6 +96,7 @@ abstract public class GeckoApp
@Override
public void onCreate(Bundle savedInstanceState)
{
Log.i("GeckoApp", "create");
super.onCreate(savedInstanceState);
mAppContext = this;
@ -190,6 +190,7 @@ abstract public class GeckoApp
@Override
public void onStop()
{
Log.i("GeckoApp", "stop");
// We're about to be stopped, potentially in preparation for
// being destroyed. We're killable after this point -- as I
// understand it, in extreme cases the process can be terminated
@ -206,9 +207,24 @@ abstract public class GeckoApp
super.onStop();
}
@Override
public void onRestart()
{
Log.i("GeckoApp", "restart");
super.onRestart();
}
@Override
public void onStart()
{
Log.i("GeckoApp", "start");
super.onStart();
}
@Override
public void onDestroy()
{
Log.i("GeckoApp", "destroy");
// Tell Gecko to shutting down; we'll end up calling System.exit()
// in onXreExit.
GeckoAppShell.sendEventToGecko(new GeckoEvent(GeckoEvent.ACTIVITY_STOPPING));
@ -219,6 +235,7 @@ abstract public class GeckoApp
@Override
public void onConfigurationChanged(android.content.res.Configuration newConfig)
{
Log.i("GeckoApp", "configuration changed");
// nothing, just ignore
super.onConfigurationChanged(newConfig);
}
@ -226,6 +243,7 @@ abstract public class GeckoApp
@Override
public void onLowMemory()
{
Log.i("GeckoApp", "low memory");
// XXX TODO
super.onLowMemory();
}