微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 手机设计讨论 > MTK手机平台交流 > mt2503 SP传过来的mid name丢失了

mt2503 SP传过来的mid name丢失了

时间:10-02 整理:3721RD 点击:
[DESCRIPTION]
姓名显示不全,如蓝牙电话本中从手机导入人名 二大爷,在查看信息结果里显示 二爷
[SOLUTION]
1。 vcard_parser.h中添加
#ifndef VCARD_FULL_N
#define VCARD_FULL_N
#endif

2. mcu/pluto/MMI/phonebook/phonebookpbapc.c 的函数mmi_phb_pbapc_convert_vobject_to_phb替换成下面的函数。
static S32 mmi_phb_pbapc_convert_vobject_to_phb(vcard_object_struct *vcard_object,
mmi_phb_pbapc_phb_info_struct *pse_phb)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
S32 i = 0, index = 0, ret = 0;
U32 field_mask = 0;
U16 temp_name[MMI_PHB_NAME_FIELD_LENGTH + 1] = {L'\0'};
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
mEMSet(pse_phb, 0x00, sizeof(mmi_phb_pbapc_phb_info_struct));
if (vcard_object->n.mid && vcard_object->n.mid[0])
{
srv_phb_remove_invalid_name(vcard_object->n.family);
srv_phb_remove_invalid_name(vcard_object->n.mid);
srv_phb_remove_invalid_name(vcard_object->n.given);
mmi_wcsncpy((WCHAR *)temp_name, vcard_object->n.mid, MMI_PHB_NAME_FIELD_LENGTH);
mmi_wcsncat((WCHAR *)(temp_name + mmi_wcslen(temp_name)), vcard_object->n.given,
MMI_PHB_NAME_FIELD_LENGTH - mmi_wcslen(temp_name));
srv_phb_convert_to_name(
pse_phb->name,
temp_name,
vcard_object->n.family,
MMI_PHB_NAME_FIELD_LENGTH);
}
else
{
srv_phb_remove_invalid_name(vcard_object->n.family);
srv_phb_remove_invalid_name(vcard_object->n.given);
srv_phb_convert_to_name(
pse_phb->name,
vcard_object->n.given,
vcard_object->n.family,
MMI_PHB_NAME_FIELD_LENGTH);
}
if (pse_phb->name[0])
{
field_mask |= 0x01;
}
for (i = 0; i < 4; ++i)
{
if (vcard_object->tel.tel && vcard_object->tel.tel[0])
{
mmi_phb_pbapc_remove_sp_char(vcard_object->tel.tel);
if (srv_phb_check_valid_number(vcard_object->tel.tel))
{
srv_phb_remove_invalid_number(vcard_object->tel.tel);
index = pse_phb->num_count;
mmi_wcsncpy(pse_phb->num[index].number, vcard_object->tel.tel, MMI_PHB_NUMBER_LENGTH);
pse_phb->num[index].type = vcard_object->tel.type;
++pse_phb->num_count;
}
}
}
MMI_TRACE(MMI_PHB_PBAPC_TRACE_GROUP, TRC_MMI_PHB_PBAPC_CONVERT_VOBJECT_TO_PHB, ret, pse_phb->num_count,
field_mask);
return ret;
}

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top