diff --git a/mobile/android/base/GeckoApp.java b/mobile/android/base/GeckoApp.java index d34ae811a2e..9e799299a73 100644 --- a/mobile/android/base/GeckoApp.java +++ b/mobile/android/base/GeckoApp.java @@ -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