Bug 984326 - [B2G] [RIL] [CDMA] Call waiting isn't working properly. The 2nd remote party cannot hear voice. r=vicamo, a=1.4+
authorHsin-Yi Tsai <htsai@mozilla.com>
Tue, 18 Mar 2014 15:57:32 +0800
changeset 192172 76b4ae5b16623c15bbf60c7f71e69ec291bb93b0
parent 192171 edfa7c4abf1f1617d57571527cf05c6830962266
child 192173 3f20111e3f191601ed4ba616991d5088a3dc432d
push id474
push userasasaki@mozilla.com
push dateMon, 02 Jun 2014 21:01:02 +0000
treeherdermozilla-release@967f4cf1b31c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvicamo, 1
bugs984326
milestone30.0a2
Bug 984326 - [B2G] [RIL] [CDMA] Call waiting isn't working properly. The 2nd remote party cannot hear voice. r=vicamo, a=1.4+
dom/telephony/gonk/TelephonyProvider.js
--- a/dom/telephony/gonk/TelephonyProvider.js
+++ b/dom/telephony/gonk/TelephonyProvider.js
@@ -524,99 +524,28 @@ TelephonyProvider.prototype = {
   holdCall: function(aClientId, aCallIndex) {
     let call = this._currentCalls[aClientId][aCallIndex];
     if (!call || !call.isSwitchable) {
       // TODO: Bug 975949 - [B2G] Telephony should throw exceptions when some
       // operations aren't allowed instead of simply ignoring them.
       return;
     }
 
-    let parentId = this._currentCalls[aClientId][aCallIndex].parentId;
-    if (parentId) {
-      this.resumeCall(aClientId, parentId);
-      return;
-    }
-
-    function onCdmaHoldCallSuccess() {
-      let call = this._currentCalls[aClientId][aCallIndex];
-      if (!call) {
-        return;
-      }
-
-      call.state = RIL.CALL_STATE_HOLDING;
-      this.notifyCallStateChanged(aClientId, call);
-
-      if (!call.childId) {
-        return;
-      }
-
-      let childCall = this._currentCalls[aClientId][call.childId];
-      childCall.state = RIL.CALL_STATE_ACTIVE;
-      this.notifyCallStateChanged(aClientId, childCall);
-    };
-
-    this._getClient(aClientId).sendWorkerMessage("holdCall", {
-      callIndex: aCallIndex
-    },(function(response) {
-        if (!response.success) {
-          return false;
-        }
-
-        if (response.isCdma) {
-          onCdmaHoldCallSuccess.call(this);
-        }
-        return false;
-    }).bind(this));
+    this._getClient(aClientId).sendWorkerMessage("holdCall", { callIndex: aCallIndex });
   },
 
   resumeCall: function(aClientId, aCallIndex) {
     let call = this._currentCalls[aClientId][aCallIndex];
     if (!call || !call.isSwitchable) {
       // TODO: Bug 975949 - [B2G] Telephony should throw exceptions when some
       // operations aren't allowed instead of simply ignoring them.
       return;
     }
 
-    let parentId = this._currentCalls[aClientId][aCallIndex].parentId;
-    if (parentId) {
-      this.holdCall(aClientId, parentId);
-      return;
-    }
-
-    function onCdmaResumeCallSuccess() {
-      let call = this._currentCalls[aClientId][aCallIndex];
-      if (!call) {
-        return;
-      }
-
-      call.state = RIL.CALL_STATE_ACTIVE;
-      this.notifyCallStateChanged(aClientId, call);
-
-      let childId = call.childId;
-      if (!childId) {
-        return;
-      }
-
-      let childCall = this._currentCalls[aClientId][childId];
-      childCall.state = RIL.CALL_STATE_HOLDING;
-      this.notifyCallStateChanged(aClientId, childCall);
-    };
-
-    this._getClient(aClientId).sendWorkerMessage("resumeCall", {
-      callIndex: aCallIndex
-    },(function(response) {
-      if (!response.success) {
-        return false;
-      }
-
-      if (response.isCdma) {
-        onCdmaResumeCallSuccess.call(this);
-      }
-      return false;
-    }).bind(this));
+    this._getClient(aClientId).sendWorkerMessage("resumeCall", { callIndex: aCallIndex });
   },
 
   conferenceCall: function(aClientId) {
     let indexes = Object.keys(this._currentCalls[aClientId]);
     if (indexes.length < 2) {
       // TODO: Bug 975949 - [B2G] Telephony should throw exceptions when some
       // operations aren't allowed instead of simply ignoring them.
       return;