久久国产成人av_抖音国产毛片_a片网站免费观看_A片无码播放手机在线观看,色五月在线观看,亚洲精品m在线观看,女人自慰的免费网址,悠悠在线观看精品视频,一级日本片免费的,亚洲精品久,国产精品成人久久久久久久

分享

mt2503[SAT]如何不顯示開機SIM卡歡迎語

 一流網(wǎng)絡技術 2017-09-14
 [DESCRIPTION]


Feature Phone 上,,如果插 SIM 卡開機,,有些 SIM 卡有提示信息,例如:“歡迎使用中國移動服務,!”,, 類似這樣的提示信息是 SIM 卡上報的 display text, 手機是按照協(xié)議要求做顯示。
display text 可分兩類:
第一類:僅僅顯示提示信息,,不需要 user 確認,;
第二類:必須要 User 輸入或確認;
針對第一類不需要 user 確認的 display text 提示信息,,在一些特殊項目上,,如果不希望顯示出來,請參考下面修改,。


[SOLUTION]

因為 display text 是 SIM 卡上報的 SAT 命令,,一定要回對應的 terminal response 給 SIM 卡,否則 SIM 卡就不能正常執(zhí)行其他的 SAT 命令,,可能出現(xiàn)的問題有:不能打電話,。所以,如果不希望顯示 display text,請參考下面修改兩點,。
為了安全,,請不要使用原有的 timer id, 也就是不要使用 SAT_TIMER_CLEAR_DELAY , 請自定義一個timer ID, 然后僅在這里使用自定義的 timer ID.
修改后的代碼:

1. 添加函數(shù):
void srv_sat_hide_display_text_timeout(void)
{
srv_sat_terminal_response_display_text(
sim_id,
SRV_SAT_TERMINAL_RES_CMD_PERFORMED_SUCCESSFULLY,
SRV_SAT_ADDITIONAL_RES_NO_SPECIFIC_CAUSE);
}


2. 修改函數(shù) :
注意代碼中 #if 1 ......#endif
如果有問題,,請?zhí)峁?/font> log, filter: MOD_L4C, MOD_COMMON_APP(group_3),MOD_SIM ( all class on ) ,MOD_FW.
MMI_BOOL srv_sat_do_display_text(
srv_sat_enum sat_id,
srv_sat_cntx_struct *context,
srv_sat_display_text_struct *display_text,
void *info)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
mmi_sat_display_text_ind_struct *sim_ind;
mmi_sim_enum sim_id = SATID_2_SIMID(sat_id);
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
sim_ind = (mmi_sat_display_text_ind_struct*) info;
memset(display_text, 0, sizeof(srv_sat_display_text_struct));
memcpy(display_text->cmd_detail, sim_ind->cmd_detail, 5 * sizeof(U8));
if (context->cmd_type == SRV_SAT_CMD_SEND_SS_RETURN_RESULT ||
context->cmd_type == SRV_SAT_CMD_SEND_USSD_RETURN_RESULT)
{
srv_sat_terminal_response_display_text(
sim_id,
SRV_SAT_TERMINAL_RES_CMD_PERFORMED_SUCCESSFULLY,
SRV_SAT_ADDITIONAL_RES_NO_SPECIFIC_CAUSE);
return MMI_FALSE;
}
if (!srv_sat_do_check(sat_id, SRV_SAT_CHECK_DM_SETTING_EX))
{
srv_sat_terminal_response_display_text(
sim_id,
SRV_SAT_TERMINAL_RES_ME_CURRENTLY_UNABLE_TO_PROCESS_CMD,
SRV_SAT_ADDITIONAL_RES_NO_SPECIFIC_CAUSE);
return MMI_FALSE;
}
/* If the ME receives an icon and either an empty, or no, alpha identifier/text string is given by the SIM, than the ME shall reject the command with general result "Commanddata not understood by ME". */
if (sim_ind->is_icon_available && !sim_ind->no_text_string)
{
srv_sat_terminal_response_display_text(
sim_id,
SRV_SAT_TERMINAL_RES_CMD_DATA_NOT_UNDERSTAND_BY_ME,
SRV_SAT_ADDITIONAL_RES_NO_SPECIFIC_CAUSE);
return MMI_FALSE;
}
/* for hide display text, which type no need user confirm. */
#if 1
kal_sys_trace("[text] 0 ");
if (sim_ind->priority == SRV_SAT_CLEAR_AFTER_SHORT_DELAY)
{
kal_sys_trace("[text] 1 ");
if(sim_ind->immediate_res == MMI_TRUE)
{
kal_sys_trace("[text] 2 ");
srv_sat_terminal_response_display_text(
sim_id,
SRV_SAT_TERMINAL_RES_CMD_PERFORMED_SUCCESSFULLY,
SRV_SAT_ADDITIONAL_RES_NO_SPECIFIC_CAUSE);
return MMI_FALSE;
}
else
{
kal_sys_trace("[text] 3 ");
StartTimer(SAT_TIMER_CLEAR_DELAY,
MMI_SAT_DISPLAY_TEXT_DELAY_DURATION*1000,
srv_sat_hide_display_text_timeout);
return MMI_FALSE;
}
}
kal_sys_trace("[text] 4 ");
#endif //
display_text->priority = (srv_sat_priority_enum) sim_ind->priority;
display_text->clear_type = (srv_sat_clear_enum) sim_ind->clear_text_type;
display_text->immediate_res = (MMI_BOOL) sim_ind->immediate_res;
display_text->text_string =
DO_TEXT(sim_ind->text_string, sim_ind->no_text_string, sim_ind-
>dcs_of_text_string);
ADD_TO_ICON(
(MMI_BOOL) sim_ind->is_icon_available, sim_ind->icon_info.icon_id,
(srv_sat_icon_enum) sim_ind->icon_info.icon_attr, &display_text->icon);
return MMI_TRUE;
}
修改前的代碼
MMI_BOOL srv_sat_do_display_text(
srv_sat_enum sat_id,
srv_sat_cntx_struct *context,
// srv_sat_display_text_struct *display_text,
void *info)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
mmi_sat_display_text_ind_struct *sim_ind;
mmi_sim_enum sim_id = SATID_2_SIMID(sat_id);
srv_sat_display_text_struct *display_text =
&g_srv_sat_proactive_sim[sat_id].cmd_data.display_text;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
sim_ind = (mmi_sat_display_text_ind_struct*) info;
memset(display_text, 0, sizeof(srv_sat_display_text_struct));
memcpy(display_text->cmd_detail, sim_ind->cmd_detail, 5 * sizeof(U8));
if (context->cmd_type == SRV_SAT_CMD_SEND_SS_RETURN_RESULT ||
context->cmd_type == SRV_SAT_CMD_SEND_USSD_RETURN_RESULT)
{
srv_sat_terminal_response_display_text(
sim_id,
SRV_SAT_TERMINAL_RES_CMD_PERFORMED_SUCCESSFULLY,
SRV_SAT_ADDITIONAL_RES_NO_SPECIFIC_CAUSE);
return MMI_FALSE;
}
if (!srv_sat_do_check(sim_id, SRV_SAT_CHECK_DM_SETTING_EX))
{
srv_sat_terminal_response_display_text(
sim_id,
SRV_SAT_TERMINAL_RES_ME_CURRENTLY_UNABLE_TO_PROCESS_CMD,
SRV_SAT_ADDITIONAL_RES_NO_SPECIFIC_CAUSE);
return MMI_FALSE;
}
/* If the ME receives an icon and either an empty, or no, alpha identifier/text string is given by the SIM, than the ME shall reject the command with general result "Commanddata not understood by ME". */
if (sim_ind->is_icon_available && !sim_ind->no_text_string)
{
srv_sat_terminal_response_display_text(
sim_id,
SRV_SAT_TERMINAL_RES_CMD_DATA_NOT_UNDERSTAND_BY_ME,
SRV_SAT_ADDITIONAL_RES_NO_SPECIFIC_CAUSE);
return MMI_FALSE;
}
display_text->priority = (srv_sat_priority_enum) sim_ind->priority;
display_text->clear_type = (srv_sat_clear_enum) sim_ind->clear_text_type;
display_text->immediate_res = (MMI_BOOL) sim_ind->immediate_res;
display_text->text_string =
DO_TEXT(sim_ind->text_string, sim_ind->no_text_string, sim_ind-
>dcs_of_text_string);
ADD_TO_ICON(
(MMI_BOOL) sim_ind->is_icon_available, sim_ind->icon_info.icon_id,
(srv_sat_icon_enum) sim_ind->icon_info.icon_attr, &display_text->icon);
return MMI_TRUE;
}

本文轉(zhuǎn)載自一牛網(wǎng)論壇—MTK硬件

原文地址:http://bbs./thread-453694-1-1.html

    本站是提供個人知識管理的網(wǎng)絡存儲空間,,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點,。請注意甄別內(nèi)容中的聯(lián)系方式,、誘導購買等信息,謹防詐騙,。如發(fā)現(xiàn)有害或侵權內(nèi)容,,請點擊一鍵舉報。
    轉(zhuǎn)藏 分享 獻花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約