Backout b796080cf4d0 (bug 931699) due to causing bug 933787.
authorGene Lian <clian@mozilla.com>
Sat, 02 Nov 2013 17:36:28 +0800
changeset 153214 2f7593f813517aad3729ff9ddabaeb46d9f9c445
parent 153213 396e593709454bd2bd0327dfdefc3318a64221a0
child 153215 78fb39abd45665be791c4a8b1f5465957d82c409
push id25572
push userclian@mozilla.com
push dateSat, 02 Nov 2013 09:38:55 +0000
treeherdermozilla-central@2f7593f81351 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs931699, 933787
milestone28.0a1
backs outb796080cf4d08cb72cf41926b6bf633b6a2660af
first release with
nightly linux32
2f7593f81351 / 28.0a1 / 20131102030205 / files
nightly linux64
2f7593f81351 / 28.0a1 / 20131102030205 / files
nightly mac
2f7593f81351 / 28.0a1 / 20131102030205 / files
nightly win32
2f7593f81351 / 28.0a1 / 20131102030205 / files
nightly win64
2f7593f81351 / 28.0a1 / 20131102030205 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backout b796080cf4d0 (bug 931699) due to causing bug 933787.
dom/system/gonk/RadioInterfaceLayer.js
--- a/dom/system/gonk/RadioInterfaceLayer.js
+++ b/dom/system/gonk/RadioInterfaceLayer.js
@@ -2204,38 +2204,23 @@ RadioInterface.prototype = {
         let offset = parseInt(data, 10);
         if (this._lastNitzMessage) {
           this._lastNitzMessage.receiveTimeInMS += offset;
         }
         this._sntp.updateOffset(offset);
         break;
       case kNetworkInterfaceStateChangedTopic:
         let network = subject.QueryInterface(Ci.nsINetworkInterface);
-        if (network.state != Ci.nsINetworkInterface.NETWORK_STATE_CONNECTED) {
-          return;
-        }
-
-        // SNTP can only update when we have mobile or Wifi connections.
-        if (network.type != Ci.nsINetworkInterface.NETWORK_TYPE_WIFI &&
-            network.type != Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE) {
-          return;
-        }
-
-        // If the network comes from RIL, make sure the RIL service is matched.
-        if (subject instanceof Ci.nsIRilNetworkInterface) {
-          network = subject.QueryInterface(Ci.nsIRilNetworkInterface);
-          if (network.serviceId != this.clientId) {
-            return;
+        if (network.state == Ci.nsINetworkInterface.NETWORK_STATE_CONNECTED) {
+          // Check SNTP when we have data connection, this may not take
+          // effect immediately before the setting get enabled.
+          if (this._sntp.isExpired()) {
+            this._sntp.request();
           }
         }
-
-        // SNTP won't update unless the SNTP is already expired.
-        if (this._sntp.isExpired()) {
-          this._sntp.request();
-        }
         break;
       case kScreenStateChangedTopic:
         this.workerMessenger.send("setScreenState", { on: (data === "on") });
         break;
     }
   },
 
   // Flag to determine whether the UI's system app is ready to receive