60A为什么获取不了本机电话号码(已经是公安特制sim卡了)
时间:10-02
整理:3721RD
点击:
60A为什么获取不了本机电话号码(已经是公安特制SIM卡了)
下面打印mynumber和 number 始终是空字符串
void srv_phb_owner_number_parse_msisdn_info(U8 sim_interface, U8 no_msisdn, l4csmu_addr_struct *msisdn)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
MMI_phb_owner_number_struct *msisdn_info;
U8 i;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (sim_interface < MMI_MAX_SIM_NUM)
{
msisdn_info = g_srv_phb_msisdn_info[sim_interface];
}
else
{
return;
}
if (no_msisdn > 0)
{
U8 number[MMI_PHB_NUMBER_PLUS_LENGTH + 1];
for (i = 0; ((i < SRV_CALLSET_MAX_LINE) && (i < no_msisdn)); i++)
{
InputboxConvertGSMToDeviceEncoding(
msisdn.alpha_id,
(U8*) msisdn_info.name,
msisdn.alpha_id_size,
(MMI_PHB_NAME_LENGTH + 1) * ENCODING_LENGTH,
msisdn.alpha_id_dcs,
0,
1);
/* now number is +**21*8123456# */
applib_decode_number(msisdn.digit, number, msisdn.ton_npi);
/* now number is **21*+8123456# */
mmi_asc_to_ucs2((CHAR*) msisdn_info.number, (CHAR*) number);
meMCPy(mynumber, number, 21);
srv_phb_send_owner_number_changed_event(sim_interface, i);
}
}
}
搜索
下面打印mynumber和 number 始终是空字符串
void srv_phb_owner_number_parse_msisdn_info(U8 sim_interface, U8 no_msisdn, l4csmu_addr_struct *msisdn)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
MMI_phb_owner_number_struct *msisdn_info;
U8 i;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (sim_interface < MMI_MAX_SIM_NUM)
{
msisdn_info = g_srv_phb_msisdn_info[sim_interface];
}
else
{
return;
}
if (no_msisdn > 0)
{
U8 number[MMI_PHB_NUMBER_PLUS_LENGTH + 1];
for (i = 0; ((i < SRV_CALLSET_MAX_LINE) && (i < no_msisdn)); i++)
{
InputboxConvertGSMToDeviceEncoding(
msisdn.alpha_id,
(U8*) msisdn_info.name,
msisdn.alpha_id_size,
(MMI_PHB_NAME_LENGTH + 1) * ENCODING_LENGTH,
msisdn.alpha_id_dcs,
0,
1);
/* now number is +**21*8123456# */
applib_decode_number(msisdn.digit, number, msisdn.ton_npi);
/* now number is **21*+8123456# */
mmi_asc_to_ucs2((CHAR*) msisdn_info.number, (CHAR*) number);
meMCPy(mynumber, number, 21);
srv_phb_send_owner_number_changed_event(sim_interface, i);
}
}
}
搜索
复制
没有做过类似的,但是你可以尝试在电话薄界面调用你这个设计的函数试试,如果在电话薄界面都不行,说明你这个函数应该是有问题的,如果可以,则应该是在调用之前,有初始化没有跑,11b之后,很多东西直接调用最终的函数都是不行了,有些参数没有初始化好