MTK通话函数流程

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

来电:

1. PsCBackCallIncoming()

ProcessIncomingEvents(CM_PS_CALL_INCOMING, info);

2.ProcessIncomingCallEvent(info)

AddNewCallInfo()在这里,cm_p->state_info.AllCalls[index].group_id = GetUnUsedGroupID();

如果是MO,那么就先设置为255,然后在PsCBackSetCallFeature( )中在设置为GetUnUsedGroupID()

CMSetupAlertForMT(); 准备提示信息

3. mmi_gsm_ring_ind()

mmi_ucm_ring_ind_struct ring_ind;

装载ring_ind

mmi_ucm_dispatch_ind(MMI_UCM_RING_IND, (void *)&ring_ind);

4. mmi_ucm_ring_ind(void *act_struct) 参数就是上面的ring_ind

如果(当前没有OUTGOING, INCOMING group,不存在紧急电话,不是黑名单号码)

{

mmi_ucm_sync_call_list(ind->call_list); 同步cm_p与g_ucm_p

把参数带进来的消息拷贝到g_ucm_p->mo_mt_display和g_ucm_p->call_misc.l4c_info中

mmi_ucm_entry_marker()

mdi_audio_stop_all()

}

否则 //自动拒接来电

{

mmi_ucm_pre_send_req(MMI_UCM_AUTO_REJECT, &(ind->uid_info), NULL, NULL);

mmi_ucm_pre_send_req(MMI_UCM_FORCE_RELEASE, &(ind->uid_info), NULL, NULL);

}

5. mmi_ucm_entry_incoming_call()

根据g_ucm_p->mo_mt_display,设置一些提示信息:tone id, path, image……

ShowCategory17Screen()

注册按键相应:

任意键接听:mmi_ucm_incoming_call_sendkey()

右软件,END键拒接:mmi_ucm_incoming_call_endkey()

SEND键接听:mmi_ucm_incoming_call_endkey()

mmi_ucm_play_incoming_tone()分2中:ring tone, wait tone

拒接来电

1.mmi_ucm_incoming_call_endkey()

mmi_ucm_stop_incoming_tone()

如果已经启动自动接听,则停止定时器UCM_AUTO_ANSWER_TIMER

mmi_ucm_end_single_action_with_index(groupIndex, 0)

2. mmi_ucm_end_single_action_with_index( )

mmi_ucm_id_info_struct actionId;

显示processing….

装载actionId

mmi_ucm_pre_send_req(MMI_UCM_END_SINGLE, &actionId, NULL, NULL);

3. mmi_ucm_pre_send_req( )

mmi_ucm_single_call_struct singleReq;

用上面的actionId装载singleReq

mmi_ucm_send_req(op_code, first_ptr->call_type, &singleReq);

4. mmi_ucm_send_req( )

mmi_gsm_ucm_act_req(MMI_UCM_END_SINGLE, act_struct);

5. mmi_gsm_ucm_act_req( )

设置:cm_p->ucm_action_type = MMI_GSM_UCM_NORMAL, cm_p->ucm_operation = MMI_GSM_UCM_END_SINGLE

mmi_gsm_end_single(act_struct);

6. mmi_gsm_end_single( ) 所有的挂断电话都是在这里处理

由于此时只有一通来电,因此执行:else if(GetTotalCallCount() == 1 && GetCurrentState() == CM_INCOMING_STATE) 这个分支

SetCallflag(CM_HANGUP_REQUESTED)

MakePsAthRequest((void*)PsCBackIncomingCallRejected);

7. MakePsAthRequest( )

发送消息:PRT_ATH_REQ

athReq->op_code = L4C_DISCONNECT_NONE;

L4C返回消息:PRT_ATH_REQ_SUCCESS,进入CBACK:

1. PsCBackIncomingCallRejected( )

ProcessIncomingEvents(CM_PS_INCOMING_CALL_REJECTED, info); J进入状态机

g_bUserReject = TRUE;

gIncomingCallDroppedFlag = TRUE

2. ProcessIncomingCallRejected()

装载cm_p->disc_call

ResetCallflag(CM_HANGUP_REQUESTED)

设置CM的状态

PurgeIncomingCallStructure()清除了该来电在cm_p中的信息。但是在cm_p->disc_call中仍然存在

mmi_gsm_release_ind(GetCallEndCause());

mmi_gsm_end_single_rsp(TRUE, NULL);

3.mmi_gsm_release_ind( )

mmi_ucm_release_ind_struct release_ind;

用cm_p->disc_call来装载release_ind

mmi_gsm_get_call_list(release_ind.call_list); 获取cm_p中的电话信息

mmi_ucm_dispatch_ind(MMI_UCM_RELEASE_IND, (void *)&release_ind);

4. mmi_ucm_release_ind()

mmi_ucm_stop_inband_tone();

mmi_ucm_stop_incoming_tone();

相关文档
最新文档