}
result
+TelephonyManager::AnswerAutoRejectCall(int callHandle)
+{
+ AppLogDebug("Enter ");
+ result r = E_FAILURE;
+ TelCallAnswerType_t answerType = TAPI_CALL_ANSWER_ACCEPT;
+ int res = -1;
+
+ AppLogDebug("tel_answer_call");
+ answerType = TAPI_CALL_ANSWER_REJECT;
+ AppCallInfo rejectedCallInfo;
+ rejectedCallInfo = *(__pIncomingCall);
+ rejectedCallInfo.SetCalllogType(CALL_LOG_TYPE_VOICE_BLOCKED);
+ SaveCallInfoToLogsDb(rejectedCallInfo);
+ delete __pIncomingCall;
+ __pIncomingCall = null;
+ // redirect to reject call back handler as the flow has to be handled
+ res = tel_answer_call(__pTapiHandle, callHandle, answerType, &HandleCallbackResponse, this);
+
+ if (res == TAPI_CAUSE_SUCCESS)
+ {
+ r = E_SUCCESS;
+ }
+ else
+ {
+ r = E_FAILURE;
+ }
+ return r;
+}
+
+result
TelephonyManager::AnswerCall(int callHandle, bool acceptCall)
{
+ AppLogDebug("Enter %d",acceptCall);
result r = E_FAILURE;
__pSoundManager->StopAlert();
TelCallAnswerType_t answerType = TAPI_CALL_ANSWER_ACCEPT;
}
else
{
+ AppLogDebug("tel_answer_call");
answerType = TAPI_CALL_ANSWER_REJECT;
// redirect to reject call back handler as the flow has to be handled
res = tel_answer_call(__pTapiHandle, callHandle, answerType, &HandleRejectCallbackResponse, this);
bool
TelephonyManager::CheckIncomingCallToBeRejected(AppCallInfo* pIncomingCallInfo)
{
+ AppLogDebug("Enter");
int callHandle = pIncomingCallInfo->GetCallHandle()->ToLong();
String contactNumber(L"");
contactNumber.Append(pIncomingCallInfo->GetContactNumber());
if (((__pSettingsManager->GetUnknownRejectStatus() == true) && (pIncomingCallInfo->GetContactInfo() == null))
|| (__pSettingsManager->IsCallToBeRejected(contactNumber) == true))
{
- AnswerCall(callHandle,false);
+ AnswerAutoRejectCall(callHandle);
return true;
}
return false;