Bug 1075644 - Move more things to after Gecko start; r=mfinkle

This commit is contained in:
Jim Chen 2014-10-20 12:55:31 -04:00
parent ca3521311b
commit c6197016d4

View File

@ -1190,8 +1190,6 @@ public abstract class GeckoApp
Class.forName("android.os.AsyncTask");
} catch (ClassNotFoundException e) {}
MemoryMonitor.getInstance().init(getApplicationContext());
// GeckoAppShell is tightly coupled to us, rather than
// the app context, because various parts of Fennec (e.g.,
// GeckoScreenOrientation) use GAS to access the Activity in
@ -1201,13 +1199,6 @@ public abstract class GeckoApp
GeckoAppShell.setContextGetter(this);
GeckoAppShell.setGeckoInterface(this);
Tabs.getInstance().attachToContext(this);
try {
Favicons.initializeWithContext(this);
} catch (Exception e) {
Log.e(LOGTAG, "Exception starting favicon cache. Corrupt resources?", e);
}
// Did the OS locale change while we were backgrounded? If so,
// we need to die so that Gecko will re-init add-ons that touch
// the UI.
@ -1259,6 +1250,15 @@ public abstract class GeckoApp
// appears quickly. The priority is reset to normal once thumbnails are loaded.
ThreadUtils.reduceGeckoPriority();
MemoryMonitor.getInstance().init(getApplicationContext());
Tabs.getInstance().attachToContext(this);
try {
Favicons.initializeWithContext(this);
} catch (Exception e) {
Log.e(LOGTAG, "Exception starting favicon cache. Corrupt resources?", e);
}
Bundle stateBundle = getIntent().getBundleExtra(EXTRA_STATE_BUNDLE);
if (stateBundle != null) {
// Use the state bundle if it was given as an intent extra. This is