Bug 1105117 - B2G RIL: reduce the times updateRILNetworkInterface() is called. r=echen
authorJessica Jong <jjong@mozilla.com>
Tue, 25 Nov 2014 19:49:00 +0100
changeset 217964 a5eaa2d643535bd52b353043fc7aa6cbd30f5a5c
parent 217963 1b10bab94f6e34a7835eb53ae5cb14a46ec19dcf
child 217965 07c56be8b2ab41fbf94a4ea04141b0a92e0944e8
push id27900
push usercbook@mozilla.com
push dateFri, 28 Nov 2014 12:44:44 +0000
treeherdermozilla-central@ca89fe557170 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersechen
bugs1105117
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1105117 - B2G RIL: reduce the times updateRILNetworkInterface() is called. r=echen
dom/system/gonk/RadioInterfaceLayer.js
--- a/dom/system/gonk/RadioInterfaceLayer.js
+++ b/dom/system/gonk/RadioInterfaceLayer.js
@@ -1931,17 +1931,19 @@ RadioInterface.prototype = {
         break;
       case "emergencyCbModeChange":
         gMobileConnectionService.notifyEmergencyCallbackModeChanged(this.clientId,
                                                                     message);
         break;
       case "networkinfochanged":
         gMobileConnectionService.notifyNetworkInfoChanged(this.clientId,
                                                           message);
-        connHandler.updateRILNetworkInterface();
+        if (message[RIL.NETWORK_INFO_DATA_REGISTRATION_STATE]) {
+          connHandler.updateRILNetworkInterface();
+        }
         break;
       case "networkselectionmodechange":
         gMobileConnectionService.notifyNetworkSelectModeChanged(this.clientId,
                                                                 message.mode);
         break;
       case "voiceregistrationstatechange":
         gMobileConnectionService.notifyVoiceInfoChanged(this.clientId, message);
         break;