Bug 1016849 - Part 1: Remove isActive (interface and ipc). r=hsinyi
authorSzu-Yu Chen [:aknow] <szchen@mozilla.com>
Thu, 29 May 2014 00:15:00 -0400
changeset 185478 eb1f34579ce69d64f9cc2835a6170f9f08203fb2
parent 185477 bcda998f8f23a9fd7d0b77f124417f1f40f12445
child 185479 e7c5b73bcb95e20d97ac9237f4209a19bcdaeb9e
push id7464
push userryanvm@gmail.com
push dateThu, 29 May 2014 12:44:24 +0000
treeherderb2g-inbound@24c221634316 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershsinyi
bugs1016849
milestone32.0a1
Bug 1016849 - Part 1: Remove isActive (interface and ipc). r=hsinyi
dom/telephony/ipc/TelephonyChild.cpp
dom/telephony/ipc/TelephonyIPCProvider.cpp
dom/telephony/ipc/TelephonyParent.cpp
dom/telephony/ipc/TelephonyTypes.ipdlh
dom/telephony/nsITelephonyProvider.idl
--- a/dom/telephony/ipc/TelephonyChild.cpp
+++ b/dom/telephony/ipc/TelephonyChild.cpp
@@ -60,17 +60,16 @@ TelephonyChild::RecvNotifyCallStateChang
                                            const IPCCallStateData& aData)
 {
   MOZ_ASSERT(mProvider);
 
   mProvider->CallStateChanged(aClientId,
                               aData.callIndex(),
                               aData.callState(),
                               aData.number(),
-                              aData.isActive(),
                               aData.isOutGoing(),
                               aData.isEmergency(),
                               aData.isConference(),
                               aData.isSwitchable(),
                               aData.isMergeable());
   return true;
 }
 
@@ -154,17 +153,16 @@ TelephonyRequestChild::RecvNotifyEnumera
                                                     const IPCCallStateData& aData)
 {
   MOZ_ASSERT(mListener);
 
   mListener->EnumerateCallState(aClientId,
                                 aData.callIndex(),
                                 aData.callState(),
                                 aData.number(),
-                                aData.isActive(),
                                 aData.isOutGoing(),
                                 aData.isEmergency(),
                                 aData.isConference(),
                                 aData.isSwitchable(),
                                 aData.isMergeable());
   return true;
 }
 
--- a/dom/telephony/ipc/TelephonyIPCProvider.cpp
+++ b/dom/telephony/ipc/TelephonyIPCProvider.cpp
@@ -350,27 +350,26 @@ TelephonyIPCProvider::SetSpeakerEnabled(
 
 // nsITelephonyListener
 
 NS_IMETHODIMP
 TelephonyIPCProvider::CallStateChanged(uint32_t aClientId,
                                        uint32_t aCallIndex,
                                        uint16_t aCallState,
                                        const nsAString& aNumber,
-                                       bool aIsActive,
                                        bool aIsOutgoing,
                                        bool aIsEmergency,
                                        bool aIsConference,
                                        bool aIsSwitchable,
                                        bool aIsMergeable)
 {
   for (uint32_t i = 0; i < mListeners.Length(); i++) {
     mListeners[i]->CallStateChanged(aClientId, aCallIndex, aCallState, aNumber,
-                                    aIsActive, aIsOutgoing, aIsEmergency,
-                                    aIsConference, aIsSwitchable, aIsMergeable);
+                                    aIsOutgoing, aIsEmergency, aIsConference,
+                                    aIsSwitchable, aIsMergeable);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 TelephonyIPCProvider::ConferenceCallStateChanged(uint16_t aCallState)
 {
   for (uint32_t i = 0; i < mListeners.Length(); i++) {
@@ -385,17 +384,16 @@ TelephonyIPCProvider::EnumerateCallState
   MOZ_CRASH("Not a EnumerateCalls request!");
 }
 
 NS_IMETHODIMP
 TelephonyIPCProvider::EnumerateCallState(uint32_t aClientId,
                                          uint32_t aCallIndex,
                                          uint16_t aCallState,
                                          const nsAString& aNumber,
-                                         bool aIsActive,
                                          bool aIsOutgoing,
                                          bool aIsEmergency,
                                          bool aIsConference,
                                          bool aIsSwitchable,
                                          bool aIsMergeable)
 {
   MOZ_CRASH("Not a EnumerateCalls request!");
 }
--- a/dom/telephony/ipc/TelephonyParent.cpp
+++ b/dom/telephony/ipc/TelephonyParent.cpp
@@ -278,27 +278,26 @@ TelephonyParent::RecvSetSpeakerEnabled(c
 
 // nsITelephonyListener
 
 NS_IMETHODIMP
 TelephonyParent::CallStateChanged(uint32_t aClientId,
                                   uint32_t aCallIndex,
                                   uint16_t aCallState,
                                   const nsAString& aNumber,
-                                  bool aIsActive,
                                   bool aIsOutgoing,
                                   bool aIsEmergency,
                                   bool aIsConference,
                                   bool aIsSwitchable,
                                   bool aIsMergeable)
 {
   NS_ENSURE_TRUE(!mActorDestroyed, NS_ERROR_FAILURE);
 
   IPCCallStateData data(aCallIndex, aCallState, nsString(aNumber),
-                        aIsActive, aIsOutgoing, aIsEmergency, aIsConference,
+                        aIsOutgoing, aIsEmergency, aIsConference,
                         aIsSwitchable, aIsMergeable);
   return SendNotifyCallStateChanged(aClientId, data) ? NS_OK : NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
 TelephonyParent::ConferenceCallStateChanged(uint16_t aCallState)
 {
   NS_ENSURE_TRUE(!mActorDestroyed, NS_ERROR_FAILURE);
@@ -313,17 +312,16 @@ TelephonyParent::EnumerateCallStateCompl
   MOZ_CRASH("Not a EnumerateCalls request!");
 }
 
 NS_IMETHODIMP
 TelephonyParent::EnumerateCallState(uint32_t aClientId,
                                     uint32_t aCallIndex,
                                     uint16_t aCallState,
                                     const nsAString& aNumber,
-                                    bool aIsActive,
                                     bool aIsOutgoing,
                                     bool aIsEmergency,
                                     bool aIsConference,
                                     bool aIsSwitchable,
                                     bool aIsMergeable)
 {
   MOZ_CRASH("Not a EnumerateCalls request!");
 }
@@ -427,17 +425,16 @@ TelephonyRequestParent::DoRequest(const 
 
 // nsITelephonyListener
 
 NS_IMETHODIMP
 TelephonyRequestParent::CallStateChanged(uint32_t aClientId,
                                          uint32_t aCallIndex,
                                          uint16_t aCallState,
                                          const nsAString& aNumber,
-                                         bool aIsActive,
                                          bool aIsOutgoing,
                                          bool aIsEmergency,
                                          bool aIsConference,
                                          bool aIsSwitchable,
                                          bool aIsMergeable)
 {
   MOZ_CRASH("Not a TelephonyParent!");
 }
@@ -456,27 +453,26 @@ TelephonyRequestParent::EnumerateCallSta
   return Send__delete__(this, EnumerateCallsResponse()) ? NS_OK : NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
 TelephonyRequestParent::EnumerateCallState(uint32_t aClientId,
                                            uint32_t aCallIndex,
                                            uint16_t aCallState,
                                            const nsAString& aNumber,
-                                           bool aIsActive,
                                            bool aIsOutgoing,
                                            bool aIsEmergency,
                                            bool aIsConference,
                                            bool aIsSwitchable,
                                            bool aIsMergeable)
 {
   NS_ENSURE_TRUE(!mActorDestroyed, NS_ERROR_FAILURE);
 
   IPCCallStateData data(aCallIndex, aCallState, nsString(aNumber),
-                        aIsActive, aIsOutgoing, aIsEmergency, aIsConference,
+                        aIsOutgoing, aIsEmergency, aIsConference,
                         aIsSwitchable, aIsMergeable);
   return SendNotifyEnumerateCallState(aClientId, data) ? NS_OK
                                                        : NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
 TelephonyRequestParent::NotifyCdmaCallWaiting(uint32_t aClientId,
                                               const nsAString& aNumber)
--- a/dom/telephony/ipc/TelephonyTypes.ipdlh
+++ b/dom/telephony/ipc/TelephonyTypes.ipdlh
@@ -8,17 +8,16 @@ namespace mozilla {
 namespace dom {
 namespace telephony {
 
 struct IPCCallStateData
 {
   uint32_t callIndex;
   uint16_t callState;
   nsString number;
-  bool     isActive;
   bool     isOutGoing;
   bool     isEmergency;
   bool     isConference;
   bool     isSwitchable;
   bool     isMergeable;
 };
 
 } /* namespace telephony */
--- a/dom/telephony/nsITelephonyProvider.idl
+++ b/dom/telephony/nsITelephonyProvider.idl
@@ -1,30 +1,28 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsISupports.idl"
 
-[scriptable, uuid(c25d3993-6481-4e12-acee-55e32f6e1454)]
+[scriptable, uuid(cd83030f-31eb-40c0-8f0e-0edef3527eec)]
 interface nsITelephonyListener : nsISupports
 {
   /**
    * Notified when a telephony call changes state.
    *
    * @param clientId
             Indicate the RIL client, 0 ~ (number of client - 1).
    * @param callIndex
    *        Call identifier assigned by the RIL.
    * @param callState
    *        One of the nsITelephonyProvider::CALL_STATE_* values.
    * @param number
    *        Number of the other party.
-   * @param isActive
-   *        Indicates whether this call is the currently active one.
    * @param isOutgoing
    *        Indicates whether this call is outgoing or incoming.
    * @param isEmergency
    *        Indicates whether this call is an emergency call.
    * @param isConference
    *        Indicates whether this call is a conference call.
    * @param isSwitchable
    *        Indicates whether this call can be switched between states of
@@ -32,17 +30,16 @@ interface nsITelephonyListener : nsISupp
    *        nsITelephonyProvider::CALL_STATE_HELD.
    * @param isMergeable
    *        Indicates whether this call be be added into a conference.
    */
   void callStateChanged(in unsigned long clientId,
                         in unsigned long callIndex,
                         in unsigned short callState,
                         in AString number,
-                        in boolean isActive,
                         in boolean isOutgoing,
                         in boolean isEmergency,
                         in boolean isConference,
                         in boolean isSwitchable,
                         in boolean isMergeable);
 
   /**
    * Called when participants of a conference call have been updated, and the
@@ -69,34 +66,31 @@ interface nsITelephonyListener : nsISupp
    * @param clientId
             Indicate the RIL client, 0 ~ (number of client - 1).
    * @param callIndex
    *        Call identifier assigned by the RIL.
    * @param callState
    *        One of the nsITelephonyProvider::CALL_STATE_* values.
    * @param number
    *        Number of the other party.
-   * @param isActive
-   *        Indicates whether this call is the active one.
    * @param isOutgoing
    *        Indicates whether this call is outgoing or incoming.
    * @param isConference
    *        Indicates whether this call is a conference call.
    * @param isSwitchable
    *        Indicates whether this call can be switched between states of
    *        nsITelephonyProvider::CALL_STATE_CONNECTED and
    *        nsITelephonyProvider::CALL_STATE_HELD.
    * @param isMergeable
    *        Indicates whether this call be be added into a conference.
    */
   void enumerateCallState(in unsigned long clientId,
                           in unsigned long callIndex,
                           in unsigned short callState,
                           in AString number,
-                          in boolean isActive,
                           in boolean isOutgoing,
                           in boolean isEmergency,
                           in boolean isConference,
                           in boolean isSwitchable,
                           in boolean isMergeable);
 
   /**
    * Notify when RIL receives supplementary service notification.