微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 手机设计讨论 > MTK手机平台交流 > 在开了FDN的情况下,发短信时如果接收人不在FDN中,能够提示因为开了FDN,发送短 ...

在开了FDN的情况下,发短信时如果接收人不在FDN中,能够提示因为开了FDN,发送短 ...

时间:10-02 整理:3721RD 点击:
[DESCRIPTION]
在开了FDN的情况下,发短信时如果接收人不在FDN中,能够提示因为开了FDN,发送短信失败。09B及以后版本供参考。
[SOLUTION]
共有三个方案,对应UC,非UC,和BackgroundSend:
UCSolution:
1.inSMSAppResDef.h,addastr_idinMMI_SMS_STRING_ENUM:STR_ID_SMS_SEND_FAILED_NOT_FDN
2.inRes_Messages.c,inPopulateMessagesResData,add:
ADD_APPLICATION_STRING2(STR_ID_SMS_SEND_FAILED_NOT_FDN,"SMSbarred-FDNonly","NumbernotinFDN");
3.UcAppCore.c,defineaglobalinSmsSenderCui.c
MMI_BOOLnotFDNCause=FALSE;
addseverallinesin:
mmi_uc_send_sms_rsp()
{
U32cause=(U32)callback_data->cause;
if(2601==cause)//added
notFDNCause=TRUE;//added
else//added
notFDNCause=FALSE;//added
}
//
4.inUcAppCore.c,add
mmi_uc_action_fsm()
{
if(result==SRV_SMS_CAUSE_NO_ERROR)
{
if(notFDNCause)//added
mmi_display_popup(
(UI_string_type)GetString(STR_ID_SMS_SEND_FAILED_NOT_FDN),
MMI_EVENT_PROPLEM);//added
else//added
/*send>saveandusethesametoneforallsendfailreasons*/
mmi_display_popup(
(UI_string_type)GetString(STR_UC_SEND_FAIL_SAVE_SUCCESS),
MMI_EVENT_PROPLEM);
}
else
{
/*send>saveandusethesametoneforallsendfailreasons*/
mmi_display_popup(
(UI_string_type)GetString(STR_UC_SEND_FAIL_SAVE_FAIL),
MMI_EVENT_PROPLEM);
}
}

非UCSolution:

1.inSmsAppResDef.h,addastr_idinMMI_SMS_STRING_ENUM:STR_ID_SMS_SEND_FAILED_NOT_FDN

2.inRes_Messages.c,inPopulateMessagesResData,add:
ADD_APPLICATION_STRING2(STR_ID_SMS_SEND_FAILED_NOT_FDN,"SMSbarred-FDNonly","NumbernotinFDN");

3.inSmsSenderCui.c,defineaglobal:
MMI_BOOLnotFDNCause=FALSE;
addseverallinesin:
cui_sms_send_msg_fsm_handle()
{
if(2601==cause)//added
notFDNCause=TRUE;//added
else//added
notFDNCause=FALSE;//added
}

4.inSmsSenderCui.c,add:
cui_sms_get_send_finish_popup_info()
{
else
{
*body_str_id=STR_SMS_SEND_SAVE_FAILED;
*event_id=MMI_EVENT_PROPLEM;
}
if(notFDNCause)//added
{
*body_str_id=STR_ID_SMS_SEND_FAILED_NOT_FDN;//added
*event_id=MMI_EVENT_PROPLEM;//added
}
}

BackgroundSendSolution:

1.inSmsAppResDef.h,addastr_idinMMI_SMS_STRING_ENUM:STR_ID_SMS_SEND_FAILED_NOT_FDN

2.inRes_Messages.c,inPopulateMessagesResData,add:
ADD_APPLICATION_STRING2(STR_ID_SMS_SEND_FAILED_NOT_FDN,"SMSbarred-FDNonly","NumbernotinFDN");

3.inSmsSendFROMStorageSrv.c,defineaglobal:
MMI_BOOLnotFDNCause=FALSE;
addseverallinesin:
srv_sms_send_from_storage_send_rsp()
{
if(2601==callback_data->cause)//added
notFDNCause=TRUE;//added
else//added
notFDNCause=FALSE;//added
}

4.inSmsPsHandler.c,add:
externMMI_BOOLnotFDNCause;
mmi_sms_handle_sms_update_unsent_msg_status()
{
caseSRV_SMS_SEND_FAIL:
{
if(event_info->is_send_abort==MMI_FALSE)
{
if(notFDNCause)//added
mmi_display_popup(
(UI_string_type)GetString(STR_ID_SMS_SEND_FAILED_NOT_FDN),
MMI_EVENT_FAILURE);//added
else//added
mmi_display_popup(
(UI_string_type)GetString(STR_SMS_SEND_FAILED),
MMI_EVENT_FAILURE);
}
}

看天书啊。真的看不懂。

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

网站地图

Top