Bug 1016849 - Part 2: Remove isActive (dom). r=hsinyi
authorSzu-Yu Chen [:aknow] <szchen@mozilla.com>
Thu, 29 May 2014 00:15:00 -0400
changeset 185479 e7c5b73bcb95e20d97ac9237f4209a19bcdaeb9e
parent 185478 eb1f34579ce69d64f9cc2835a6170f9f08203fb2
child 185480 45fbee730e464a3dbc5edab8ee918f78723cfa85
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 2: Remove isActive (dom). r=hsinyi
dom/telephony/Telephony.cpp
--- a/dom/telephony/Telephony.cpp
+++ b/dom/telephony/Telephony.cpp
@@ -481,29 +481,29 @@ Telephony::EventListenerAdded(nsIAtom* a
   }
 }
 
 // nsITelephonyListener
 
 NS_IMETHODIMP
 Telephony::CallStateChanged(uint32_t aServiceId, uint32_t aCallIndex,
                             uint16_t aCallState, const nsAString& aNumber,
-                            bool aIsActive, bool aIsOutgoing, bool aIsEmergency,
+                            bool aIsOutgoing, bool aIsEmergency,
                             bool aIsConference, bool aIsSwitchable, bool aIsMergeable)
 {
   nsRefPtr<TelephonyCall> modifiedCall
       = GetCallFromEverywhere(aServiceId, aCallIndex);
 
   if (modifiedCall) {
     modifiedCall->UpdateEmergency(aIsEmergency);
     modifiedCall->UpdateSwitchable(aIsSwitchable);
     modifiedCall->UpdateMergeable(aIsMergeable);
 
     if (!aIsConference) {
-      UpdateActiveCall(modifiedCall, aIsActive);
+      UpdateActiveCall(modifiedCall, IsActiveState(aCallState));
     }
 
     if (modifiedCall->CallState() != aCallState) {
       // We don't fire the statechange event on a call in conference here.
       // Instead, the event will be fired later in
       // TelephonyCallGroup::ChangeState(). Thus the sequence of firing the
       // statechange events is guaranteed: first on TelephonyCallGroup then on
       // individual TelephonyCall objects.
@@ -575,17 +575,17 @@ Telephony::EnumerateCallStateComplete()
     NS_WARNING("Failed to register listener!");
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 Telephony::EnumerateCallState(uint32_t aServiceId, uint32_t aCallIndex,
                               uint16_t aCallState, const nsAString& aNumber,
-                              bool aIsActive, bool aIsOutgoing, bool aIsEmergency,
+                              bool aIsOutgoing, bool aIsEmergency,
                               bool aIsConference, bool aIsSwitchable, bool aIsMergeable)
 {
   nsRefPtr<TelephonyCall> call;
 
   // We request calls enumeration in constructor, and the asynchronous result
   // will be sent back through the callback function EnumerateCallState().
   // However, it is likely to have call state changes, i.e. CallStateChanged()
   // being called, before the enumeration result comes back. We'd make sure