Bug 712517 - Disable ActivityObserver on Android to fix blank screen bugs [r=mfinkle]
authorMatt Brubeck <mbrubeck@mozilla.com>
Tue, 03 Jan 2012 10:28:54 -0800
changeset 84923 df86a9abc6fade2af444c98a51c8479260ebf1e3
parent 84922 7f4ccc0e14d32631b78053853bd0ab923fa33657
child 84924 e8589944b67174f3b828954eab1da8bd2604cc0c
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs712517
milestone12.0a1
Bug 712517 - Disable ActivityObserver on Android to fix blank screen bugs [r=mfinkle]
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 };