如何在没有WIFI网络的环境里,也能有开关去关闭Wifi应用?

前提:10A.W10.32及其以后开pluto MMI版本 
1. 在\plutommi\mmi\DataAccount\DataAccountRes找到Dataaccount.res, 
在Menu Resource Area的最后,添加一个MENU ID: 
<MENU id="MENU_ID_WLAN_WIZARD_LIST_OPT_ld" type="OPTION" str="STR_GLOBAL_OPTIONS">  
<MENUITEM_ID>MENU_ID_WLAN_WIZARD_LIST_OPT_OFF</MENUITEM_ID> 
</MENU>  
#endif  
 
2. 在DataAccountUI.c --> mmi_wlan_entry_new_wizard_list() 找到这个函数的后面一部份: 
else 
 { 
 if (ap_list_num) 
 { 
 ShowCategory73Screen( 
 STR_ID_DTCNT_WLAN_SCAN_RESULT, 
 #ifdef __WIFI_WIZARD_SUPPORT__ 
 GetRootTitleIcon(MAIN_MENU_WLAN_WIZARD_MENUID), 
 #else 
 GetRootTitleIcon(MENU_ID_WLAN_MAIN), 
 #endif  
STR_GLOBAL_OPTIONS, 
 IMG_GLOBAL_OPTIONS, 
 STR_GLOBAL_BACK, 
 IMG_GLOBAL_BACK, 
 ap_list_num, 
 subMenuDataPtrs, 
 (U16*) icon_list, 
 iconStates, 
 g_wlan_display_context.wizard_cur_profile_list_index, 
 guiBuffer, 
 ICON_TEXT_ICON); 
 if (g_wlan_display_context.wizard_list_option == WLAN_MATCH_SE_SA_C || 
 g_wlan_display_context.wizard_list_option == WLAN_MATCH_SA_C) 
 { 
 ChangeCenterSoftkey(0, IMG_GLOBAL_COMMON_CSK); 
 SetCenterSoftkeyFunction(mmi_wlan_entry_network_disconnect, KEY_EVENT_UP); 
 } 
 else 
 { 
 ChangeCenterSoftkey(0, IMG_GLOBAL_COMMON_CSK); 
 SetCenterSoftkeyFunction(mmi_wlan_entry_wizard_connect, KEY_EVENT_UP); 
 } 
  
 SetLeftSoftkeyFunction(mmi_wlan_entry_wizard_list_opt, KEY_EVENT_UP); 
 } 
 else 
 { 
 ShowCategory73Screen( 
 STR_ID_DTCNT_WLAN_SCAN_RESULT, 
 #ifdef __WIFI_WIZARD_SUPPORT__ 
 GetRootTitleIcon(MAIN_MENU_WLAN_WIZARD_MENUID), 
 #else 
 GetRootTitleIcon(MENU_ID_WLAN_MAIN), 
 #endif  
0, 
 0, 
 STR_GLOBAL_BACK, 
 IMG_GLOBAL_BACK, 
 ap_list_num, 
 subMenuDataPtrs, 
 (U16*) icon_list, 
 iconStates, 
 g_wlan_display_context.wizard_cur_profile_list_index, 
 guiBuffer, 
 ICON_TEXT_ICON); 
 } 
 } 
修改成: 
else 
 { 
 ShowCategory73Screen( 
 STR_ID_DTCNT_WLAN_SCAN_RESULT, 
 #ifdef __WIFI_WIZARD_SUPPORT__ 
 GetRootTitleIcon(MAIN_MENU_WLAN_WIZARD_MENUID), 
 #else 
 GetRootTitleIcon(MENU_ID_WLAN_MAIN), 
 #endif  
STR_GLOBAL_OPTIONS, 
 IMG_GLOBAL_OPTIONS, 
 STR_GLOBAL_BACK, 
 IMG_GLOBAL_BACK, 
 ap_list_num, 
 subMenuDataPtrs, 
 (U16*) icon_list, 
 iconStates, 
 g_wlan_display_context.wizard_cur_profile_list_index, 
 guiBuffer, 
 ICON_TEXT_ICON); 
 if (g_wlan_display_context.wizard_list_option == WLAN_MATCH_SE_SA_C || 
 g_wlan_display_context.wizard_list_option == WLAN_MATCH_SA_C) 
 { 
 ChangeCenterSoftkey(0, IMG_GLOBAL_COMMON_CSK); 
 SetCenterSoftkeyFunction(mmi_wlan_entry_network_disconnect, KEY_EVENT_UP); 
 } 
 else 
 { 
 ChangeCenterSoftkey(0, IMG_GLOBAL_COMMON_CSK); 
 SetCenterSoftkeyFunction(mmi_wlan_entry_wizard_connect, KEY_EVENT_UP); 
 } 
  
 SetLeftSoftkeyFunction(mmi_wlan_entry_wizard_list_opt, KEY_EVENT_UP);  
 } 
 
3. 在mmi_wlan_entry_wizard_list_opt这个函数里: 
void mmi_wlan_entry_wizard_list_opt(void) 

 ................. 
 g_wlan_display_context.insert_mode = FALSE; 
if(g_wlan_display_context.ap_list_num > 0)  

 switch(g_wlan_display_context.wizard_list_option) 
 //以下保持不变 
 ........................... 

 else 

 wlan_menu_cui_id = cui_menu_create( 
 wlan_parent_group_id,  
CUI_MENU_SRC_TYPE_RESOURCE,  
CUI_MENU_TYPE_OPTION,  
MENU_ID_WLAN_WIZARD_LIST_OPT_ld,  
MMI_TRUE,  
NULL);  

 cui_menu_run(wlan_menu_cui_id); 
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值