Bug 763160 - [Otoro]: 3G Data Call connect fail. r=vicamo
authorPhilipp von Weitershausen <philipp@weitershausen.de>
Thu, 21 Jun 2012 15:31:21 +0800
changeset 97234 8711c1240d060799528f2391eb6e63f08048148e
parent 97233 e24a42876bc5c7bb3a8f6f54f91bedff9798988c
child 97235 10e019421e6b5e3339ab2a7962704e8d3f6f57aa
push id22962
push useremorley@mozilla.com
push dateThu, 21 Jun 2012 10:59:14 +0000
treeherdermozilla-central@10e019421e6b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvicamo
bugs763160
milestone16.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 763160 - [Otoro]: 3G Data Call connect fail. r=vicamo
dom/system/gonk/ril_worker.js
--- a/dom/system/gonk/ril_worker.js
+++ b/dom/system/gonk/ril_worker.js
@@ -44,16 +44,17 @@ const DEFAULT_EMERGENCY_NUMBERS = ["112"
 
 let RILQUIRKS_CALLSTATE_EXTRA_UINT32 = false;
 let RILQUIRKS_DATACALLSTATE_DOWN_IS_UP = false;
 // This flag defaults to true since on RIL v6 and later, we get the
 // version number via the UNSOLICITED_RIL_CONNECTED parcel.
 let RILQUIRKS_V5_LEGACY = true;
 let RILQUIRKS_REQUEST_USE_DIAL_EMERGENCY_CALL = false;
 let RILQUIRKS_MODEM_DEFAULTS_TO_EMERGENCY_MODE = false;
+let RILQUIRKS_DATACALLSTATE_NO_SUGGESTEDRETRYTIME = false;
 
 /**
  * This object contains helpers buffering incoming data & deconstructing it
  * into parcels as well as buffering outgoing data & constructing parcels.
  * For that it maintains two buffers and corresponding uint8 views, indexes.
  *
  * The incoming buffer is a circular buffer where we store incoming data.
  * As soon as a complete parcel is received, it is processed right away, so
@@ -703,16 +704,22 @@ let RIL = {
           if (DEBUG) {
             debug("Detected I9020/I9023, enabling " +
                   "RILQUIRKS_DATACALLSTATE_DOWN_IS_UP");
           }
           RILQUIRKS_DATACALLSTATE_DOWN_IS_UP = true;
         }
         break;
       case "Qualcomm RIL 1.0":
+        let product_model = libcutils.property_get("ro.product.model");
+        if (DEBUG) debug("Detected product model " + product_model);
+        if (product_model == "otoro1") {
+          if (DEBUG) debug("Enabling RILQUIRKS_DATACALLSTATE_NO_SUGGESTEDRETRYTIME.");
+          RILQUIRKS_DATACALLSTATE_NO_SUGGESTEDRETRYTIME = true;
+        }
         if (DEBUG) {
           debug("Detected Qualcomm RIL 1.0, " +
                 "disabling RILQUIRKS_V5_LEGACY and " +
                 "enabling RILQUIRKS_MODEM_DEFAULTS_TO_EMERGENCY_MODE.");
         }
         RILQUIRKS_V5_LEGACY = false;
         RILQUIRKS_MODEM_DEFAULTS_TO_EMERGENCY_MODE = true;
         break;
@@ -3261,17 +3268,19 @@ RIL.readDataCall_v5 = function readDataC
   };
 };
 
 RIL.readDataCall_v6 = function readDataCall_v6(obj) {
   if (!obj) {
     obj = {};
   }
   obj.status = Buf.readUint32();  // DATACALL_FAIL_*
-  obj.suggestedRetryTime = Buf.readUint32();
+  if (!RILQUIRKS_DATACALLSTATE_NO_SUGGESTEDRETRYTIME) {
+    obj.suggestedRetryTime = Buf.readUint32();
+  }
   obj.cid = Buf.readUint32().toString();
   obj.active = Buf.readUint32();  // DATACALL_ACTIVE_*
   obj.type = Buf.readString();
   obj.ifname = Buf.readString();
   obj.ipaddr = Buf.readString();
   obj.dns = Buf.readString();
   obj.gw = Buf.readString();
   if (obj.dns) {
@@ -3492,17 +3501,17 @@ RIL[UNSOLICITED_NITZ_TIME_RECEIVED] = fu
 RIL[UNSOLICITED_SIGNAL_STRENGTH] = function UNSOLICITED_SIGNAL_STRENGTH(length) {
   this[REQUEST_SIGNAL_STRENGTH](length, {rilRequestError: ERROR_SUCCESS});
 };
 RIL[UNSOLICITED_DATA_CALL_LIST_CHANGED] = function UNSOLICITED_DATA_CALL_LIST_CHANGED(length) {
   if (RILQUIRKS_V5_LEGACY) {
     this.getDataCallList();
     return;
   }
-  this[REQUEST_GET_DATA_CALL_LIST](length, {rilRequestError: ERROR_SUCCESS});
+  this[REQUEST_DATA_CALL_LIST](length, {rilRequestError: ERROR_SUCCESS});
 };
 RIL[UNSOLICITED_SUPP_SVC_NOTIFICATION] = null;
 RIL[UNSOLICITED_STK_SESSION_END] = null;
 RIL[UNSOLICITED_STK_PROACTIVE_COMMAND] = null;
 RIL[UNSOLICITED_STK_EVENT_NOTIFY] = null;
 RIL[UNSOLICITED_STK_CALL_SETUP] = null;
 RIL[UNSOLICITED_SIM_SMS_STORAGE_FULL] = null;
 RIL[UNSOLICITED_SIM_REFRESH] = null;