Bug 1170296 - Take |holding| as one of the active states. r=aknow, a=jocheng
authorBen Hsu <driftersprt@gmail.com>
Tue, 02 Jun 2015 20:22:00 -0400
changeset 238623 74b9b62fc0cddfca7e05d0d7e9c51958024d8728
parent 238622 de95964cc6da32d956cfd153db58cdb1d0dc62ff
child 238624 cce7cbe0262c04466a77a19d695d12c8b79459ea
push id692
push userryanvm@gmail.com
push dateThu, 11 Jun 2015 00:43:10 +0000
treeherdermozilla-b2g37_v2_2@74b9b62fc0cd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaknow, jocheng
bugs1170296
milestone37.0
Bug 1170296 - Take |holding| as one of the active states. r=aknow, a=jocheng
dom/telephony/Telephony.cpp
--- a/dom/telephony/Telephony.cpp
+++ b/dom/telephony/Telephony.cpp
@@ -531,17 +531,18 @@ void
 Telephony::SetSpeakerEnabled(bool aEnabled, ErrorResult& aRv)
 {
   aRv = mService->SetSpeakerEnabled(aEnabled);
 }
 
 void
 Telephony::GetActive(Nullable<OwningTelephonyCallOrTelephonyCallGroup>& aValue)
 {
-  if (mGroup->CallState() == nsITelephonyService::CALL_STATE_CONNECTED) {
+  if (mGroup->CallState() == nsITelephonyService::CALL_STATE_CONNECTED ||
+      mGroup->CallState() == nsITelephonyService::CALL_STATE_HOLDING) {
     aValue.SetValue().SetAsTelephonyCallGroup() = mGroup;
   } else {
     // Search the first active call.
     for (uint32_t i = 0; i < mCalls.Length(); i++) {
       if (IsActiveState(mCalls[i]->CallState())) {
         aValue.SetValue().SetAsTelephonyCall() = mCalls[i];
         return;
       }