当前位置: 代码迷 >> 综合 >> 双卡项目,若只插SIM1卡,收到push消息时,为什么有时响应SIM1卡铃声,有时响应SIM2铃声
  详细解决方案

双卡项目,若只插SIM1卡,收到push消息时,为什么有时响应SIM1卡铃声,有时响应SIM2铃声

热度:69   发布时间:2024-01-19 20:17:20.0
在收到push,并且将通知UM(统一收件箱)新消息到来的indication处理函数如下:
void srv_wap_push_send_um_new_msg_ind (U32 msg_id, U32 timestamp, U16 sim_id)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    srv_um_new_msg_ind_struct *local_data;


    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    local_data = (srv_um_new_msg_ind_struct*) OslConstructDataPtr(sizeof(srv_um_new_msg_ind_struct));


local_data->msg_type = SRV_UM_MSG_WAP_PUSH;
local_data->msg_id = msg_id;
local_data->timestamp = timestamp;
    local_data->msg_box_type = SRV_UM_MSG_BOX_INBOX;
    local_data->tone_id = 0;
#if (MMI_MAX_SIM_NUM >= 2)
    local_data->sim_id = srv_wap_push_map_sim_id_to_um_sim_id(sim_id);
#endif /* __MMI_WAP_DUAL_SIM__ */


    srv_wap_push_send_msg_to_mmi (MSG_ID_MMI_UM_NEW_MSG_IND, (void*)local_data);
}
该函数中会对srv_um_new_msg_ind_struct结构体中的tone_id赋值,tone_id对应不同铃声,由于此处赋值没有区分SIM卡,所以响应铃声有时是SIM1有时SIM2。 
改法就是在此函数添加对SIM卡的判断,分别给tone_id赋值,
  相关解决方案