Bug 899028 - [B2G] [CDMA] reject an incoming call. r=vicamo
authorHsin-Yi Tsai <htsai@mozilla.com>
Mon, 29 Jul 2013 18:47:24 +0800
changeset 140365 d778e5ef5d0d239a182fd6e1e26bf161d5b25d1e
parent 140364 87cd2d8df686e2f5f726ca835df2bc078af8e265
child 140366 76c042ae93ee8c09dc0d35a05185abc7dd390876
push id25027
push userryanvm@gmail.com
push dateMon, 29 Jul 2013 21:26:22 +0000
treeherdermozilla-central@5065fdc12408 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvicamo
bugs899028
milestone25.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 899028 - [B2G] [CDMA] reject an incoming call. r=vicamo
dom/system/gonk/ril_worker.js
--- a/dom/system/gonk/ril_worker.js
+++ b/dom/system/gonk/ril_worker.js
@@ -1893,16 +1893,22 @@ let RIL = {
     // notification the incoming/waiting call may have changed. The main
     // thread thinks that it is rejecting the call with the given index,
     // so only reject if that is still incoming/waiting.
     let call = this.currentCalls[options.callIndex];
     if (!call) {
       return;
     }
 
+    if (this._isCdma) {
+      // AT+CHLD=0 means "release held or UDUB."
+      Buf.simpleRequest(REQUEST_HANGUP_WAITING_OR_BACKGROUND);
+      return;
+    }
+
     switch (call.state) {
       case CALL_STATE_INCOMING:
         Buf.simpleRequest(REQUEST_UDUB);
         break;
       case CALL_STATE_WAITING:
         // Reject the waiting (second) call, and remain the first call.
         Buf.simpleRequest(REQUEST_HANGUP_WAITING_OR_BACKGROUND);
         break;