Bug 1058585 - setDataRegistration instantly replies success if it doesn't need to send a request to rild. r=hsinyi
authorEdgar Chen <echen@mozilla.com>
Tue, 26 Aug 2014 17:56:27 +0800
changeset 224419 b817a5217c83a3a2092d9c89bc3a64ceac65f18c
parent 224418 4fc76317f526880a7e6bdb0c51fb1c40889ef7a4
child 224420 e7174ed15179f5a8109ea23f7e691c3e35b0ccb6
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershsinyi
bugs1058585
milestone34.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 1058585 - setDataRegistration instantly replies success if it doesn't need to send a request to rild. r=hsinyi
dom/system/gonk/ril_worker.js
--- a/dom/system/gonk/ril_worker.js
+++ b/dom/system/gonk/ril_worker.js
@@ -2378,19 +2378,25 @@ RilObject.prototype = {
    */
   setDataRegistration: function(options) {
     this._attachDataRegistration = options.attach;
 
     if (RILQUIRKS_DATA_REGISTRATION_ON_DEMAND) {
       let request = options.attach ? RIL_REQUEST_GPRS_ATTACH :
                                      RIL_REQUEST_GPRS_DETACH;
       this.context.Buf.simpleRequest(request, options);
+      return;
     } else if (RILQUIRKS_SUBSCRIPTION_CONTROL && options.attach) {
       this.context.Buf.simpleRequest(REQUEST_SET_DATA_SUBSCRIPTION, options);
-    }
+      return;
+    }
+
+    // We don't really send a request to rild, so instantly reply success to
+    // RadioInterfaceLayer.
+    this.sendChromeMessage(options);
   },
 
   /**
    * Get failure casue code for the most recently failed PDP context.
    */
   getFailCauseCode: function(callback) {
     this.context.Buf.simpleRequest(REQUEST_LAST_CALL_FAIL_CAUSE,
                                    {callback: callback});