mt2503 [PHB]如何在IDLE界面拨打SDN号码时能显示其名称?

本文介绍了解决SDN(Service Dialing Number)列表中号码与名称无法在IDLE界面匹配的问题。通过在启动过程中加载SDN数据并修改相关函数,使得在任意界面下拨打SDN号码时都能正确显示对应名称。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

[DESCRIPTION]
SDN(Service Dialing Number)在SDN列表中能显示号码和其对应的名称,如果从SDN列表界面呼叫 ,呼叫界面显示匹配的名称,但是在IDLE界面拨打SDN号码,呼叫界面不能匹配到SDN列表中相应的名 称。

[SOLUTION]
目前设计是在开机的时候load了 ADN 和FDN中具体的号码和姓名等信息,并没有初始化SDN,只是在 进入SDN 列表的时候l才去load的 SDN 号码。若实现该功能,需要在开机的过程中也把SDN load出 来,可以参考如下修改:
1)PhbSrvGprot.h
//增加函数申明
/*****************************************************************************
* FUNCTION
* srv_phb_xmgnt_search_sdn_by_number
* DESCRIPTION
* This function is used to search SDN name (SIM1 or SIM2) by number.
* PARAMETERS
* sim_interface: [IN] SIM1/SIM2
* number: [IN] Number to dial
* name: [OUT] Name to match the number
* RETURNS
* PHB entry index
*****************************************************************************/
extern U16 srv_phb_xmgnt_search_sdn_by_number(U8 sim_interface, U16 *number, U16
*name);


2)PhbSrv.h
//增加函数申明
/*****************************************************************************
* FUNCTION
* srv_phb_xmgnt_read_sdn_to_ram
* DESCRIPTION
* This function is used to read SDN list (both SIM1 and SIM2) to ram for call querying  name.
* PARAMETERS
* init_cb: [IN] startup callback
* RETURNS
* void
*****************************************************************************/
void srv_phb_xmgnt_read_sdn_to_ram(sim_interface_enum sim_id,
srv_phb_startup_callback_type init_cb, void* user_data);
/*****************************************************************************
* FUNCTION
* srv_phb_xmgnt_read_sdn_to_ram_rsp
* DESCRIPTION
*
* PARAMETERS
* info [IN]
* RETURNS
* void
*****************************************************************************/
void srv_phb_xmgnt_read_sdn_to_ram_rsp(void *info, int mod_id);


3)PhbSrv.c
//修改函数srv_phb_get_caller_info_by_number()
/* We will try to search the name in FDN list */
store_index = srv_phb_xmgnt_search_fdn_by_number(cm_param->sim_interface, cm_param-
>number, phb_info->name);
if (store_index != 0xFFFF)
{
// phb_info->phb_id.storage_type = PHB_FDN;
// phb_info->phb_id.contact_index = store_index;
return MMI_TRUE;
}
//增加开始点
/* We will try to search the name in SDN list */
store_index = srv_phb_xmgnt_search_sdn_by_number(cm_param->sim_interface, cm_param-
>number, phb_info->name);
if (store_index != 0xFFFF)
{
// phb_info->phb_id.storage_type = PHB_FDN;
// phb_info->phb_id.contact_index = store_index;
return MMI_TRUE;
}
//增加结束点


4)PhbStartupSrv.c
//增加函数申明
static void srv_phb_startup_read_fdn_hdlr(void *user_data);
//修改函数srv_phb_startup_read_fdn_hdlr()
/*****************************************************************************
* FUNCTION
* srv_phb_startup_read_fdn_hdlr
* DESCRIPTION
*
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
static void srv_phb_startup_read_fdn_hdlr(void * user_data)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
srv_phb_startup_finish_cntx_struct* finish_cntx =
(srv_phb_startup_finish_cntx_struct*)user_data;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
//删除开始点
//srv_phb_datamgr_startup_read_sim_finish(finish_cntx->sim_id, finish_cntx->sim_total);
//srv_phb_mem_free(finish_cntx);
//删除结束点
//新增开始点
srv_phb_xmgnt_read_sdn_to_ram((sim_interface_enum)(finish_cntx->sim_id),
srv_phb_startup_read_sdn_hdlr, user_data);
//新增结束点
}
//新增函数srv_phb_startup_read_sdn_hdlr
/*****************************************************************************
* FUNCTION
* srv_phb_startup_read_sdn_hdlr
* DESCRIPTION
*
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
static void srv_phb_startup_read_sdn_hdlr(void * user_data)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
srv_phb_startup_finish_cntx_struct* finish_cntx =
(srv_phb_startup_finish_cntx_struct*)user_data;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
srv_phb_datamgr_startup_read_sim_finish(finish_cntx->sim_id, finish_cntx->sim_total);
srv_phb_mem_free(finish_cntx);
}
//修改函数srv_phb_startup_read_entry_by_index_rsp()
void srv_phb_startup_read_entry_by_index_rsp(void *info, int mod_src)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
U8 sim_id = srv_phb_get_sim_id_by_mod_id(mod_src);
phb_type_enum entry_type = srv_phb_startup_get_initing_entry_type(sim_id);
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
#ifdef __MMI_PHB_USIM_SUPPORT__
if (entry_type == PHB_ANR)
{
srv_phb_read_anr_rsp(info, mod_src);
}
else
#endif
if (entry_type == PHB_FDN)
{
srv_phb_xmgnt_read_fdn_to_ram_rsp(info, mod_src);
}
//新增开始点
else if (entry_type == PHB_SDN)
{
srv_phb_xmgnt_read_sdn_to_ram_rsp(info, mod_src);
}
//新增结束点

}

资料来源:一牛网论坛 MT2503

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值