Bug 712517 - Disable ActivityObserver on Android to fix blank screen bugs [r=mfinkle, a=akeybl]
authorMatt Brubeck <mbrubeck@mozilla.com>
Tue, 03 Jan 2012 10:28:54 -0800
changeset 84842 1d0e777d59e155325e9521f679fd751f199ad196
parent 84841 3b8917046a7889bf4483d302b5f257cf69d4a43a
child 84843 f75d64d286038f43a8b7f76fc06ecb056c41430e
push id519
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 00:38:35 +0000
treeherdermozilla-beta@788ea1ef610b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle, akeybl
bugs712517
milestone11.0a2
Bug 712517 - Disable ActivityObserver on Android to fix blank screen bugs [r=mfinkle, a=akeybl]
mobile/xul/chrome/content/browser.js
--- a/mobile/xul/chrome/content/browser.js
+++ b/mobile/xul/chrome/content/browser.js
@@ -356,22 +356,25 @@ var Browser = {
     window.controllers.appendController(BrowserUI);
 
     var os = Services.obs;
     os.addObserver(XPInstallObserver, "addon-install-blocked", false);
     os.addObserver(XPInstallObserver, "addon-install-started", false);
     os.addObserver(SessionHistoryObserver, "browser:purge-session-history", false);
     os.addObserver(ContentCrashObserver, "ipc:content-shutdown", false);
     os.addObserver(MemoryObserver, "memory-pressure", false);
+#ifndef ANDROID
+    // Disabled on Android because of bug 712517
     os.addObserver(ActivityObserver, "application-background", false);
     os.addObserver(ActivityObserver, "application-foreground", false);
     os.addObserver(ActivityObserver, "system-active", false);
     os.addObserver(ActivityObserver, "system-idle", false);
     os.addObserver(ActivityObserver, "system-display-on", false);
     os.addObserver(ActivityObserver, "system-display-off", false);
+#endif
 
     // Listens for change in the viewable area
 #if MOZ_PLATFORM_MAEMO == 6
     os.addObserver(ViewableAreaObserver, "softkb-change", false);
 #endif
 
     window.QueryInterface(Ci.nsIDOMChromeWindow).browserDOMWindow = new nsBrowserAccess();
 
@@ -529,22 +532,25 @@ var Browser = {
     messageManager.removeMessageListener("Browser:PluginClickToPlayClicked", this);
 
     var os = Services.obs;
     os.removeObserver(XPInstallObserver, "addon-install-blocked");
     os.removeObserver(XPInstallObserver, "addon-install-started");
     os.removeObserver(SessionHistoryObserver, "browser:purge-session-history");
     os.removeObserver(ContentCrashObserver, "ipc:content-shutdown");
     os.removeObserver(MemoryObserver, "memory-pressure");
+#ifndef ANDROID
+    // Disabled on Android because of bug 712517
     os.removeObserver(ActivityObserver, "application-background", false);
     os.removeObserver(ActivityObserver, "application-foreground", false);
     os.removeObserver(ActivityObserver, "system-active", false);
     os.removeObserver(ActivityObserver, "system-idle", false);
     os.removeObserver(ActivityObserver, "system-display-on", false);
     os.removeObserver(ActivityObserver, "system-display-off", false);
+#endif
 
     window.controllers.removeController(this);
     window.controllers.removeController(BrowserUI);
   },
 
   getHomePage: function getHomePage(aOptions) {
     aOptions = aOptions || { useDefault: false };