微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 手机设计讨论 > MTK手机平台交流 > mt2503发送SMS_MMS时,可以选择Optional number(10A)

mt2503发送SMS_MMS时,可以选择Optional number(10A)

时间:10-02 整理:3721RD 点击:
一、 针对短彩合一的版本
PS: 第 1~4 步的修改针对于 Multi Select 功能开启的版本;第 5 步针对于 Multi Select 功能没有开启的版本
1. 修改函数 MMI_uc_search_phb_recipient ,将其中如下 Code :
cui_phb_list_select_contact_set_field_fiLTEr(g_uc_p-
>main.select_contact_cui_gid, SRV_PHB_ENTRY_FIELD_NUMBER |
SRV_PHB_ENTRY_FIELD_EMAIL);
修改为:
cui_phb_list_select_contact_set_field_filter(g_uc_p-
>main.select_contact_cui_gid, SRV_PHB_ENTRY_FIELD_GSM_NUM |
SRV_PHB_ENTRY_FIELD_EMAIL);
2. 修改函数 mmi_phb_mark_several_select_field ,将其中如下 Code :
case SRV_PHB_ENTRY_FIELD_NUMBER | SRV_PHB_ENTRY_FIELD_EMAIL:
修改为:
case SRV_PHB_ENTRY_FIELD_GSM_NUM | SRV_PHB_ENTRY_FIELD_EMAIL:
3. 修改函数 mmi_uc_handle_addr_callback ,将其中如下 Code :
if (num_type[index] == MMI_PHB_NUMBER_TYPE_NUMBER)
修改为:
if (num_type[index] & (MMI_PHB_NUMBER_TYPE_NUMBER |
MMI_PHB_NUMBER_TYPE_HOME_NUMBER |
MMI_PHB_NUMBER_TYPE_OFFICE_NUMBER | MMI_PHB_NUMBER_TYPE_FAX_NUMBER))
4. 修改函数 mmi_phb_mark_several_for_msg_get_number ,如下:
void mmi_phb_mark_several_for_msg_get_number(U8 *dest, U8 max_dest_len,
U16 PhbIndex, U8 num_type)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
switch (num_type)
{
case MMI_PHB_NUMBER_TYPE_NUMBER:
{
U16 number[MMI_PHB_NUMBER_LENGTH + 1 + 1];
srv_phb_get_number(PhbIndex, number, MMI_PHB_NUMBER_LENGTH + 1);
mmi_phb_truncate_number_field_to_max_len((U16 *) dest, number,
max_dest_len);
break;
}
//add the following code
#if 1
case MMI_PHB_NUMBER_TYPE_HOME_NUMBER:
{
U16 number[MMI_PHB_NUMBER_LENGTH + 1 + 1];
srv_phb_get_optional_number(PhbIndex, SRV_PHB_ENTRY_FIELD_HOME, number,
NULL, MMI_PHB_NUMBER_LENGTH + 1);
mmi_phb_truncate_number_field_to_max_len((U16 *) dest, number,
max_dest_len);
break;
}
case MMI_PHB_NUMBER_TYPE_OFFICE_NUMBER:
{
U16 number[MMI_PHB_NUMBER_LENGTH + 1 + 1];
srv_phb_get_optional_number(PhbIndex, SRV_PHB_ENTRY_FIELD_OFFICE, number,
NULL, MMI_PHB_NUMBER_LENGTH + 1);
mmi_phb_truncate_number_field_to_max_len((U16 *) dest, number,
max_dest_len);
break;
}
case MMI_PHB_NUMBER_TYPE_FAX_NUMBER:
{
U16 number[MMI_PHB_NUMBER_LENGTH + 1 + 1];
srv_phb_get_optional_number(PhbIndex, SRV_PHB_ENTRY_FIELD_FAX, number,
NULL, MMI_PHB_NUMBER_LENGTH + 1);
mmi_phb_truncate_number_field_to_max_len((U16 *) dest, number,
max_dest_len);
break;
}
#endif
//end add
#if !defined(__MMI_PHB_NO_OPTIONAL_FIELD__)
case MMI_PHB_NUMBER_TYPE_EMAIL_ADDRESS:
{
U16 email[MMI_PHB_EMAIL_LENGTH + 1];
srv_phb_get_email_address(PhbIndex, email, MMI_PHB_EMAIL_LENGTH);
mmi_ucs2ncpy((S8 *) dest, (S8 *) email, max_dest_len);
break;
}
#endif
#if !defined(__MMI_PHB_NO_OPTIONAL_FIELD__)
#if defined(__MMI_PHB_OPTIONAL_FIELDS_2ND_EMAIL__)
case MMI_PHB_NUMBER_TYPE_EMAIL_ADDRESS_2:
{
U16 email[MMI_PHB_EMAIL_LENGTH + 1];
srv_phb_get_email_address2(PhbIndex, email, MMI_PHB_EMAIL_LENGTH);
mmi_ucs2ncpy((S8 *) dest, (S8 *) email, max_dest_len);
break;
}
#endif
#endif /* !defined(__MMI_PHB_NO_OPTIONAL_FIELD__) */
default:
break;
}
}
5. 修改函数 mmi_uc_search_phb_recipient ,将其中如下 Code :
if(g_uc_p->srv_msg_type->caller_specific_msg_type ==
MMI_UC_MSG_TYPE_SMS_ONLY)
{
cui_phb_list_select_contact_set_field_filter(g_uc_p-
>main.select_contact_cui_gid, SRV_PHB_ENTRY_FIELD_NUMBER);
}
修改为:
if(g_uc_p->srv_msg_type->caller_specific_msg_type ==
MMI_UC_MSG_TYPE_SMS_ONLY)
{
cui_phb_list_select_contact_set_field_filter(g_uc_p-
>main.select_contact_cui_gid, SRV_PHB_ENTRY_FIELD_GSM_NUM);
}
二、 针对非短彩合一的版本
1. 按照短彩合一版本的第 1~5 步修改 Code
2. 修改函数 cui_sms_recipient_add_fROM_contacts ,将其中如下 Code:
filter_type = SRV_PHB_ENTRY_FIELD_NUMBER;
修改为:
filter_type = SRV_PHB_ENTRY_FIELD_GSM_NUM;

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

网站地图

Top