Bug 952783 - Use first call instead of active call. r=hsinyi

This commit is contained in:
Szu-Yu Chen [:aknow] 2014-01-15 09:41:50 -05:00
parent c17f701bb8
commit 3c4bb3761c

View File

@ -697,11 +697,11 @@ Telephony::NotifyError(uint32_t aServiceId,
NS_IMETHODIMP
Telephony::NotifyCdmaCallWaiting(uint32_t aServiceId, const nsAString& aNumber)
{
MOZ_ASSERT(mActiveCall &&
mActiveCall->ServiceId() == aServiceId &&
mActiveCall->CallState() == nsITelephonyProvider::CALL_STATE_CONNECTED);
MOZ_ASSERT(mCalls.Length() == 1);
nsRefPtr<TelephonyCall> callToNotify = mCalls[0];
MOZ_ASSERT(callToNotify && callToNotify->ServiceId() == aServiceId);
nsRefPtr<TelephonyCall> callToNotify = mActiveCall;
callToNotify->UpdateSecondNumber(aNumber);
DispatchCallEvent(NS_LITERAL_STRING("callschanged"), callToNotify);
return NS_OK;