Bug 821181 - Setting call waiting status only when user manually sets the value. r=allstars.chh, a=blocking-basecamp
authorHsin-Yi Tsai <htsai@mozilla.com>
Thu, 13 Dec 2012 15:03:35 +0800
changeset 117826 56a099c5eb4a89b502dc1ea733f2240a2fb9eca9
parent 117825 16d8a3a6cddba99932016a15036259b148464462
child 117827 8afaec9efcd6b74f0a6fde52f0ba7043dc895494
push id84
push userryanvm@gmail.com
push dateMon, 24 Dec 2012 17:20:34 +0000
reviewersallstars, blocking-basecamp
bugs821181
milestone18.0
Bug 821181 - Setting call waiting status only when user manually sets the value. r=allstars.chh, a=blocking-basecamp
dom/system/gonk/RadioInterfaceLayer.js
--- a/dom/system/gonk/RadioInterfaceLayer.js
+++ b/dom/system/gonk/RadioInterfaceLayer.js
@@ -264,19 +264,16 @@ function RadioInterfaceLayer() {
   lock.get("ril.mms.mmsproxy", this);
   lock.get("ril.mms.mmsport", this);
   lock.get("ril.supl.apn", this);
   lock.get("ril.supl.user", this);
   lock.get("ril.supl.passwd", this);
   lock.get("ril.supl.httpProxyHost", this);
   lock.get("ril.supl.httpProxyPort", this);
 
-  // Read the desired setting of call waiting from the settings DB.
-  lock.get("ril.callwaiting.enabled", this);
-
   // Read the 'time.nitz.automatic-update.enabled' setting to see if
   // we need to adjust the system clock time and time zone by NITZ.
   lock.get(kTimeNitzAutomaticUpdateEnabled, this);
 
   // Read the Cell Broadcast Search List setting, string of integers or integer
   // ranges separated by comma, to set listening channels.
   lock.get(kCellBroadcastSearchList, this);
 
@@ -818,22 +815,16 @@ RadioInterfaceLayer.prototype = {
     voiceInfo.connected = newInfo.connected;
     voiceInfo.roaming = newInfo.roaming;
     voiceInfo.emergencyCallsOnly = newInfo.emergencyCallsOnly;
     // Unlike the data registration info, the voice info typically contains
     // no (useful) radio tech information, so we have to manually set
     // this here. (TODO GSM only for now, see bug 726098.)
     voiceInfo.type = "gsm";
 
-    // Ensure the call waiting status once the voice network connects.
-    if (voiceInfo.connected && this.callWaitingStatus == null) {
-      // The call waiting status has not been updated yet. Update that.
-      this.setCallWaitingEnabled(this._callWaitingEnabled);
-    }
-
     // Make sure we also reset the operator and signal strength information
     // if we drop off the network.
     if (newInfo.regState == RIL.NETWORK_CREG_STATE_UNKNOWN) {
       voiceInfo.network = null;
       voiceInfo.signalStrength = null;
       voiceInfo.relSignalStrength = null;
     }
 
@@ -1082,17 +1073,17 @@ RadioInterfaceLayer.prototype = {
     debug("Current call waiting status is " + this.callWaitingStatus +
           ", desired call waiting status is " + value);
     if (!this.rilContext.voice.connected) {
       // The voice network is not connected. Wait for that.
       return;
     }
 
     if (value == null) {
-      // We haven't read the initial value from the settings DB yet.
+      // We haven't read the valid value from the settings DB yet.
       // Wait for that.
       return;
     }
 
     if (this.callWaitingStatus != value) {
       debug("Setting call waiting status to " + value);
       this.worker.postMessage({rilMessageType: "setCallWaiting", enabled: value});
     }