Bug 794766 - B2G Telephony: phone is hanging after a busy call is released by operator. r=philikon
authorHsin-Yi Tsai <htsai@mozilla.com>
Thu, 27 Sep 2012 20:19:56 +0800
changeset 108530 96faff88d7928f0c85de918de6a5e1b8677fc31c
parent 108529 6786b5f4ee4a79d22df9cc6931a36f1f99ca81be
child 108531 85a545c8cd49e795b56c604a9ed99917665966f0
push id82
push usershu@rfrn.org
push dateFri, 05 Oct 2012 13:20:22 +0000
reviewersphilikon
bugs794766
milestone18.0a1
Bug 794766 - B2G Telephony: phone is hanging after a busy call is released by operator. r=philikon
dom/system/gonk/ril_consts.js
dom/system/gonk/ril_worker.js
--- a/dom/system/gonk/ril_consts.js
+++ b/dom/system/gonk/ril_consts.js
@@ -1664,17 +1664,27 @@ const GECKO_NETWORK_STATE_DISCONNECTING 
 const GECKO_NETWORK_STATE_DISCONNECTED = 3;
 
 // Used for QUERY_AVAILABLE_NETWORKS status of "unknown"
 const GECKO_QAN_STATE_UNKNOWN = null;
 
 const CALL_FAIL_UNOBTAINABLE_NUMBER = 1;
 const CALL_FAIL_NORMAL = 16;
 const CALL_FAIL_BUSY = 17;
+const CALL_FAIL_NO_USER_RESPONDING = 18;
+const CALL_FAIL_USER_ALERTING = 19;
+const CALL_FAIL_CALL_REJECTED = 21;
+const CALL_FAIL_NUMBER_CHANGED = 22;
+const CALL_FAIL_CALL_PRE_EMPTION = 25;
+const CALL_FAIL_DEST_OUT_OF_ORDER = 27;
+const CALL_FAIL_INVALID_FORMAT = 28;
+const CALL_FAIL_FACILITY_REJECTED = 29;
 const CALL_FAIL_CONGESTION = 34;
+const CALL_FAIL_NETWORK_OUT_OF_ORDER = 38;
+const CALL_FAIL_NETWORK_TEMP_FAILURE = 41;
 const CALL_FAIL_ACM_LIMIT_EXCEEDED = 68;
 const CALL_FAIL_CALL_BARRED = 240;
 const CALL_FAIL_FDN_BLOCKED = 241;
 const CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242;
 const CALL_FAIL_IMEI_NOT_ACCEPTED = 243;
 const CALL_FAIL_ERROR_UNSPECIFIED = 0xffff;
 
 // Other Gecko-specific constants
@@ -1711,29 +1721,49 @@ NETWORK_CREG_TO_GECKO_MOBILE_CONNECTION_
 NETWORK_CREG_TO_GECKO_MOBILE_CONNECTION_STATE[NETWORK_CREG_STATE_SEARCHING_EMERGENCY_CALLS] = GECKO_MOBILE_CONNECTION_STATE_SEARCHING;
 NETWORK_CREG_TO_GECKO_MOBILE_CONNECTION_STATE[NETWORK_CREG_STATE_DENIED_EMERGENCY_CALLS] = GECKO_MOBILE_CONNECTION_STATE_DENIED;
 NETWORK_CREG_TO_GECKO_MOBILE_CONNECTION_STATE[NETWORK_CREG_STATE_UNKNOWN_EMERGENCY_CALLS] = GECKO_MOBILE_CONNECTION_STATE_UNKNOWN;
 
 
 const GECKO_CALL_ERROR_BAD_NUMBER             = "BadNumberError";
 const GECKO_CALL_ERROR_NORMAL_CALL_CLEARING   = "NormalCallClearingError";
 const GECKO_CALL_ERROR_BUSY                   = "BusyError";
+const GECKO_CALL_ERROR_NO_USER_RESPONDING     = "NoUserRespondingError";
+const GECKO_CALL_ERROR_USER_ALERTING          = "UserAlertingNoAnswerError";
+const GECKO_CALL_ERROR_REJECTED               = "CallRejectedError";
+const GECKO_CALL_ERROR_NUMBER_CHANGED         = "NumberChangedError";
+const GECKO_CALL_ERROR_PRE_EMPTION            = "PreEmptionError";
+const GECKO_CALL_ERROR_DEST_OUT_OF_ORDER      = "DestinationOutOfOrderError";
+const GECKO_CALL_ERROR_INVALID_NUMBER_FORMAT  = "InvalidNumberFormatError";
+const GECKO_CALL_ERROR_FACILITY_REJECTED      = "FacilityRejectedError";
 const GECKO_CALL_ERROR_CONGESTION             = "CongestionError";
+const GECKO_CALL_ERROR_NETWORK_OUT_OF_ORDER   = "NetworkOutOfOrderError";
+const GECKO_CALL_ERROR_NETWORK_TEMP_FAILURE   = "NetworkTempFailureError";
 const GECKO_CALL_ERROR_INCOMING_CALL_EXCEEDED = "IncomingCallExceededError";
 const GECKO_CALL_ERROR_BARRED                 = "BarredError";
 const GECKO_CALL_ERROR_FDN_BLOCKED            = "FDNBlockedError";
 const GECKO_CALL_ERROR_SUBSCRIBER_UNKNOWN     = "SubscriberUnknownError";
 const GECKO_CALL_ERROR_DEVICE_NOT_ACCEPTED    = "DeviceNotAcceptedError";
 const GECKO_CALL_ERROR_UNSPECIFIED            = "UnspecifiedError";
 
 const RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR = {};
 RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_UNOBTAINABLE_NUMBER] = GECKO_CALL_ERROR_BAD_NUMBER;
 RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_NORMAL]              = GECKO_CALL_ERROR_NORMAL_CALL_CLEARING;
 RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_BUSY]                = GECKO_CALL_ERROR_BUSY;
+RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_NO_USER_RESPONDING]  = GECKO_CALL_ERROR_NO_USER_RESPONDING;
+RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_USER_ALERTING]       = GECKO_CALL_ERROR_USER_ALERTING;
+RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_CALL_REJECTED]       = GECKO_CALL_ERROR_REJECTED;
+RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_NUMBER_CHANGED]      = GECKO_CALL_ERROR_NUMBER_CHANGED;
+RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_CALL_PRE_EMPTION]    = GECKO_CALL_ERROR_PRE_EMPTION;
+RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_DEST_OUT_OF_ORDER]   = GECKO_CALL_ERROR_DEST_OUT_OF_ORDER;
+RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_INVALID_FORMAT]      = GECKO_CALL_ERROR_INVALID_NUMBER_FORMAT;
+RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_FACILITY_REJECTED]   = GECKO_CALL_ERROR_FACILITY_REJECTED;
 RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_CONGESTION]          = GECKO_CALL_ERROR_CONGESTION;
+RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_NETWORK_OUT_OF_ORDER]= GECKO_CALL_ERROR_NETWORK_OUT_OF_ORDER;
+RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_NETWORK_TEMP_FAILURE]= GECKO_CALL_ERROR_NETWORK_TEMP_FAILURE;
 RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_ACM_LIMIT_EXCEEDED]  = GECKO_CALL_ERROR_INCOMING_CALL_EXCEEDED;
 RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_CALL_BARRED]         = GECKO_CALL_ERROR_BARRED;
 RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_FDN_BLOCKED]         = GECKO_CALL_ERROR_FDN_BLOCKED;
 RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_IMSI_UNKNOWN_IN_VLR] = GECKO_CALL_ERROR_SUBSCRIBER_UNKNOWN;
 RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_IMEI_NOT_ACCEPTED]   = GECKO_CALL_ERROR_DEVICE_NOT_ACCEPTED;
 RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_ERROR_UNSPECIFIED]   = GECKO_CALL_ERROR_UNSPECIFIED;
 
 const GECKO_DATACALL_ERROR_OPERATOR_BARRED               = "OperatorBarredError";
--- a/dom/system/gonk/ril_worker.js
+++ b/dom/system/gonk/ril_worker.js
@@ -3823,24 +3823,17 @@ RIL[REQUEST_LAST_CALL_FAIL_CAUSE] = func
     case CALL_FAIL_NORMAL:
       this._handleDisconnectedCall(options);
       break;
     case CALL_FAIL_BUSY:
       options.state = CALL_STATE_BUSY;
       this._handleChangedCallState(options);
       this._handleDisconnectedCall(options);
       break;
-    case CALL_FAIL_UNOBTAINABLE_NUMBER:
-    case CALL_FAIL_CONGESTION:
-    case CALL_FAIL_ACM_LIMIT_EXCEEDED:
-    case CALL_FAIL_CALL_BARRED:
-    case CALL_FAIL_FDN_BLOCKED:
-    case CALL_FAIL_IMSI_UNKNOWN_IN_VLR:
-    case CALL_FAIL_IMEI_NOT_ACCEPTED:
-    case CALL_FAIL_ERROR_UNSPECIFIED:
+    default:
       options.rilMessageType = "callError";
       options.error = RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[failCause];
       this.sendDOMMessage(options);
       break;
   }
 };
 RIL[REQUEST_SIGNAL_STRENGTH] = function REQUEST_SIGNAL_STRENGTH(length, options) {
   if (options.rilRequestError) {