Bug 735165 - B2G RIL: Change nsIRadioInterfaceLayer::CALL_STATE_RINGING to CALL_STATE_ALERTING for consistency. r=philikon
authorHsinyi Tsai <htsai@mozilla.com>
Wed, 14 Mar 2012 19:03:33 +0800
changeset 89435 f378bd681310fa46fb3886c6efc1154160b52b94
parent 89434 29e6ffe61193aecc680446dcef18a459f8d5b928
child 89436 2892ef58d7f5406cb8e0bd20815ab7c7caf2592d
push idunknown
push userunknown
push dateunknown
reviewersphilikon
bugs735165
milestone14.0a1
Bug 735165 - B2G RIL: Change nsIRadioInterfaceLayer::CALL_STATE_RINGING to CALL_STATE_ALERTING for consistency. r=philikon
dom/system/gonk/RadioInterfaceLayer.js
dom/system/gonk/nsIRadioInterfaceLayer.idl
dom/telephony/TelephonyCall.cpp
--- a/dom/system/gonk/RadioInterfaceLayer.js
+++ b/dom/system/gonk/RadioInterfaceLayer.js
@@ -77,17 +77,17 @@ function convertRILCallState(state) {
   switch (state) {
     case RIL.CALL_STATE_ACTIVE:
       return nsIRadioInterfaceLayer.CALL_STATE_CONNECTED;
     case RIL.CALL_STATE_HOLDING:
       return nsIRadioInterfaceLayer.CALL_STATE_HELD;
     case RIL.CALL_STATE_DIALING:
       return nsIRadioInterfaceLayer.CALL_STATE_DIALING;
     case RIL.CALL_STATE_ALERTING:
-      return nsIRadioInterfaceLayer.CALL_STATE_RINGING;
+      return nsIRadioInterfaceLayer.CALL_STATE_ALERTING;
     case RIL.CALL_STATE_INCOMING:
       return nsIRadioInterfaceLayer.CALL_STATE_INCOMING;
     case RIL.CALL_STATE_WAITING:
       return nsIRadioInterfaceLayer.CALL_STATE_HELD; // XXX This may not be right...
     default:
       throw new Error("Unknown rilCallState: " + state);
   }
 }
@@ -349,17 +349,17 @@ RadioInterfaceLayer.prototype = {
   /**
    * Handle call state changes by updating our current state and the audio
    * system.
    */
   handleCallStateChange: function handleCallStateChange(call) {
     debug("handleCallStateChange: " + JSON.stringify(call));
     call.state = convertRILCallState(call.state);
     if (call.state == nsIRadioInterfaceLayer.CALL_STATE_DIALING ||
-        call.state == nsIRadioInterfaceLayer.CALL_STATE_RINGING ||
+        call.state == nsIRadioInterfaceLayer.CALL_STATE_ALERTING ||
         call.state == nsIRadioInterfaceLayer.CALL_STATE_CONNECTED) {
       // This is now the active call.
       this._activeCall = call;
     }
     this.updateCallAudioState();
     this._deliverCallback("callStateChanged",
                           [call.callIndex, call.state, call.number]);
   },
--- a/dom/system/gonk/nsIRadioInterfaceLayer.idl
+++ b/dom/system/gonk/nsIRadioInterfaceLayer.idl
@@ -111,22 +111,22 @@ interface nsIRILDataCallback : nsISuppor
    *        Array of nsIRILDataCallInfo objects.
    * @param length
    *        Lenght of the aforementioned array.
    */
   void receiveDataCallList([array,size_is(length)] in nsIRILDataCallInfo dataCalls,
                            in unsigned long length);
 };
 
-[scriptable, uuid(78fc7ef6-0941-4fc8-89ff-de9398ef478a)]
+[scriptable, uuid(7a439b15-d398-4c57-9772-15aa6d3bc34f)]
 interface nsIRadioInterfaceLayer : nsISupports
 {
   const unsigned short CALL_STATE_UNKNOWN = 0;
   const unsigned short CALL_STATE_DIALING = 1;
-  const unsigned short CALL_STATE_RINGING = 2;
+  const unsigned short CALL_STATE_ALERTING = 2;
   const unsigned short CALL_STATE_BUSY = 3;
   const unsigned short CALL_STATE_CONNECTING = 4;
   const unsigned short CALL_STATE_CONNECTED = 5;
   const unsigned short CALL_STATE_HOLDING = 6;
   const unsigned short CALL_STATE_HELD = 7;
   const unsigned short CALL_STATE_RESUMING = 8;
   const unsigned short CALL_STATE_DISCONNECTING = 9;
   const unsigned short CALL_STATE_DISCONNECTED = 10;
--- a/dom/telephony/TelephonyCall.cpp
+++ b/dom/telephony/TelephonyCall.cpp
@@ -73,17 +73,17 @@ TelephonyCall::ChangeStateInternal(PRUin
 {
   nsRefPtr<TelephonyCall> kungFuDeathGrip(this);
 
   nsString stateString;
   switch (aCallState) {
     case nsIRadioInterfaceLayer::CALL_STATE_DIALING:
       stateString.AssignLiteral("dialing");
       break;
-    case nsIRadioInterfaceLayer::CALL_STATE_RINGING:
+    case nsIRadioInterfaceLayer::CALL_STATE_ALERTING:
       stateString.AssignLiteral("ringing");
       break;
     case nsIRadioInterfaceLayer::CALL_STATE_BUSY:
       stateString.AssignLiteral("busy");
       break;
     case nsIRadioInterfaceLayer::CALL_STATE_CONNECTING:
       stateString.AssignLiteral("connecting");
       break;