根据Sim卡的插卡情况过滤通话记录

修改两处代码:
mmi_sim_enum g_sim_filter=0;
static SRV_CLOG_HANDLE mmi_clog_create_srv_handle(mmi_clog_inst_struct *inst)
{
srv_clog_create_struct create;
srv_clog_init_para(SRV_CLOG_PARA_CREATE, &create);
//根据插卡情况设置Sim过滤器
if(srv_sim_ctrl_is_inserted(MMI_SIM1))
create.identity.sim_id|=MMI_SIM1;
if(srv_sim_ctrl_is_inserted(MMI_SIM2))
create.identity.sim_id|=MMI_SIM2;
g_sim_filter= create.identity.sim_id;
create.user_data = inst;
return srv_clog_create(&create);
}
extern mmi_sim_enum g_sim_filter;
static void mmi_clog_lt_refresh_data(mmi_clog_lt_inst_struct *inst)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
//考虑双卡都没有插的情况
if(g_sim_filter ==0)
return ;

mmi_clog_lt_update_read_status(inst);
mmi_clog_lt_load_num(inst);
mmi_clog_lt_load_log_ids(inst);
/* Can only refresh current index of select lt_id */
mmi_clog_lt_refresh_sel_index(inst);
}

你可能感兴趣的:(根据Sim卡的插卡情况过滤通话记录)