Backed out changeset a3d1c00b6592 (bug 984919) for causing bug 988979
authorEd Morley <emorley@mozilla.com>
Fri, 28 Mar 2014 17:03:17 +0000
changeset 175795 5dea2146a09995a87695ba20eebdafc2d2909e41
parent 175794 94322fe721fb9cb3e3c9dad6d6e1bfae92c9ad1c
child 175884 88ae1bfaaf3d9b68a81b9b1bad66c3a7f312df2e
push id26499
push useremorley@mozilla.com
push dateFri, 28 Mar 2014 17:06:57 +0000
treeherdermozilla-central@5dea2146a099 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs984919, 988979
milestone31.0a1
backs outa3d1c00b659293dd912898ec760c7b7ac526cce7
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
Backed out changeset a3d1c00b6592 (bug 984919) for causing bug 988979
dom/telephony/gonk/TelephonyProvider.js
--- a/dom/telephony/gonk/TelephonyProvider.js
+++ b/dom/telephony/gonk/TelephonyProvider.js
@@ -30,19 +30,16 @@ const kPrefDefaultServiceId = "dom.telep
 const nsIAudioManager = Ci.nsIAudioManager;
 const nsITelephonyProvider = Ci.nsITelephonyProvider;
 
 const CALL_WAKELOCK_TIMEOUT = 5000;
 
 // Index of the CDMA second call which isn't held in RIL but only in TelephoyProvider.
 const CDMA_SECOND_CALL_INDEX = 2;
 
-const DIAL_ERROR_INVALID_STATE_ERROR = "InvalidStateError";
-const DIAL_ERROR_OTHER_CONNECTION_IN_USE = "OtherConnectionInUse";
-
 let DEBUG;
 function debug(s) {
   dump("TelephonyProvider: " + s + "\n");
 }
 
 XPCOMUtils.defineLazyGetter(this, "gAudioManager", function getAudioManager() {
   try {
     return Cc["@mozilla.org/telephony/audiomanager;1"]
@@ -418,35 +415,17 @@ TelephonyProvider.prototype = {
   },
 
   isDialing: false,
   dial: function(aClientId, aNumber, aIsEmergency, aTelephonyCallback) {
     if (DEBUG) debug("Dialing " + (aIsEmergency ? "emergency " : "") + aNumber);
 
     if (this.isDialing) {
       if (DEBUG) debug("Already has a dialing call. Drop.");
-      aTelephonyCallback.notifyDialError(DIAL_ERROR_INVALID_STATE_ERROR);
-      return;
-    }
-
-    // For DSDS, if there is aleady a call on SIM X, we cannot place any new
-    // call on other SIM.
-    let callOnOtherSim = false;
-    for (let cid = 0; cid < this._numClients; ++cid) {
-      if (cid === aClientId) {
-        continue;
-      }
-      if (Object.keys(this._currentCalls[cid]).length !== 0) {
-        callOnOtherSim = true;
-        break;
-      }
-    }
-    if (callOnOtherSim) {
-      if (DEBUG) debug("Already has a call on other sim. Drop.");
-      aTelephonyCallback.notifyDialError(DIAL_ERROR_OTHER_CONNECTION_IN_USE);
+      aTelephonyCallback.notifyDialError("InvalidStateError");
       return;
     }
 
     // we don't try to be too clever here, as the phone is probably in the
     // locked state. Let's just check if it's a number without normalizing
     if (!aIsEmergency) {
       aNumber = gPhoneNumberUtils.normalize(aNumber);
     }