TelephonyManager::EndActiveCall(Long callHandle)
{
result r = E_FAILURE;
-
//fetch ended callInfo from active call list
AppCallInfo endCall;
r = __pActiveCallList->GetValue(callHandle.ToLong(), endCall);
{
r = EndCall(endCall);
}
+
return r;
}
AppLog("ENTER");
//This callback comes only if a conference call is ended by user.
TelephonyManager* pTelManager = (TelephonyManager*) pUserData;
+ AppCallInfo heldCall;
if (callBackResult == TAPI_CAUSE_SUCCESS && pData != null)
{
//fetch ended confCall details
{
//fetch active calls to show appropriate scene
pCallList = static_cast<ArrayListT<AppCallInfo>*>(pTelManager->__pActiveCallList->GetValuesN());
+ r = pCallList->GetAt(0, heldCall);
+ if (r == E_SUCCESS)
+ {
+ //pTelManager->HoldActiveCall(&heldCall, false);
+ AppCallInfo* pHeldCallInfo = new (std::nothrow) AppCallInfo();
+ unsigned int callHandle = heldCall.GetCallHandle()->ToLong();
+ //copy state into new callinfo object
+ *pHeldCallInfo = heldCall;
+
+ //set call to hold state
+ pHeldCallInfo->SetOnHold(false);
+
+ pTelManager->__pActiveCallList->Remove(callHandle);
+ //replace old object with new
+ pTelManager->__pActiveCallList->Add(callHandle, *pHeldCallInfo);
+ delete pCallList;
+ pCallList = static_cast<ArrayListT<AppCallInfo>*>(pTelManager->__pActiveCallList->GetValuesN());
+ }
}
//notify listener that call is disconnected.
pTelManager->__pEventListener->HandleCallDisconnected(isLastCall, *pCallList);
TelephonyManager::HandleEndNormalActiveCall(AppCallInfo& endCallInfo)
{
AppLogDebug("Enter");
+ result r = E_FAILURE;
+ AppCallInfo heldCall;
// This function gets called only from HandleIdleCallback(),
// to handle disconnection of normal active calls.
if (endCallInfo.IsConferenceCall() == false)
{
//fetch active calls to show appropriate scene
pCallList = static_cast<ArrayListT<AppCallInfo>*>(__pActiveCallList->GetValuesN());
+ //fetch the held call on disconnecting the active call and activate it.
+ r = pCallList->GetAt(0, heldCall);
+ if (r == E_SUCCESS)
+ {
+ HoldActiveCall(&heldCall, false);
+ delete pCallList;
+ pCallList = static_cast<ArrayListT<AppCallInfo>*>(__pActiveCallList->GetValuesN());
+ }
}
//Save "End" call info to call log database