FAQ-MT6250,11B1132MP,錄音過程中來鬧鈴,沒有鈴聲

来源:https://www.cnblogs.com/16rd/archive/2019/06/15/11026905.html
-Advertisement-
Play Games

跟綜下來發現control_sound這個函數中if (behavior == MMI_NOTI_SND_BEHA_NO_PLAY){#ifdef MMI_NOTI_MGR_UTplay_sound = MMI_FALSE;snd_action = action;play_sound_id = to ...


跟綜下來發現control_sound這個函數中
if (behavior == MMI_NOTI_SND_BEHA_NO_PLAY)
{
#ifdef MMI_NOTI_MGR_UT
play_sound = MMI_FALSE;
snd_action = action;
play_sound_id = tone_id;
#endif /* MMI_NOTI_MGR_UT */
return;
}返回了.
修改方法:
關註//add begin和//add end 之間的語句。
static MMI_BOOL
control_notification(
U8 notification_type,
notification_info_struct *noti_info)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
mmi_app_scenario_struct noti_scen, active_scen;
mmi_app_behavior_struct internal_behavior;
mmi_scenario_id active_scen_id;
MMI_BOOL display_scrn = MMI_FALSE;
const mmi_events_notify_struct *notify_event_info = NULL;
mmi_nmgr_behavior_enum attri_action;
mmi_attribute_action_struct action_struct;
MMI_BOOL is_stop_tone = MMI_FALSE;
MMI_BOOL is_stop_vib = MMI_FALSE;
MMI_BOOL is_stop_text_preview = MMI_FALSE;
#ifdef __MMI_NSS_SUPPORT__
U16 notification_setting_value = 0;
#endif
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
#ifdef __DM_LAWMO_SUPPORT__
if (mmi_dmui_is_phone_lock() && (notification_type ==
MMI_NOTIFY_COMM_POPUP))
{
MMI_TRACE(MMI_FW_TRC_G1_FRM, TRC_MMI_FRM_NMGR_DISBALE_NMGR_BY_DM_LOCK);
return MMI_FALSE;
}
#endif
if (mmi_frm_has_no_scenario_been_started() == MMI_TRUE)
{
return MMI_FALSE;
}
if (g_enable_nmgr == MMI_FALSE)
{
return MMI_FALSE;
}
active_scen_id = mmi_frm_get_active_scenario_id();
get_scenario_info(noti_info->noti_scen_id, &noti_scen);
get_scenario_info(active_scen_id, &active_scen);
compare_scenario_and_get_behavior(active_scen_id, noti_info->noti_scen_id,
&internal_behavior);
if( active_scen.scrn_priority >= MMI_SCEN_SCRN_PRIO_HIGH)
{
is_stop_text_preview = MMI_TRUE;
}
/* Get notify configuration information by user to decide the action of
each attribute. */
notify_event_info = mmi_nmgr_get_event_notify_info(noti_info->notify_type,
active_scen_id);
MMI_ASSERT(NULL != notify_event_info);
attri_action = notify_event_info->behavior;
parse_attri_action(attri_action, &action_struct);
if (notification_type == MMI_NOTIFY_BY_IDLE)
{/* App handle screen work flow, may add extra info, like setting key,
scrn handler */
MMI_ASSERT(noti_info->scrn_func_ptr == NULL && noti_info->arg == NULL);
/* Won't check screen behavior since this kind of screen will be displayed
when goback to idle */
display_scrn = control_idle_screen(noti_info->noti_scen_id, noti_info-
>notify_type, noti_scen.scrn_priority, noti_info->string,
internal_behavior.scrn_behavior);
}
else if (notification_type == MMI_NOTIFY_BY_APP)
{/* App may not display screen for some special case */
display_scrn = control_app_screen(
noti_info->noti_scen_id,
noti_scen.scrn_priority,
internal_behavior.scrn_behavior,
noti_info->scrn_func_ptr,
noti_info->arg,
action_struct.scrn_action,
NULL,
noti_info->notify_type);
}
else if (notification_type == MMI_NOTIFY_COMM_POPUP)
{
display_scrn = control_popup_screen(noti_info->noti_scen_id, noti_info-
>string, noti_info->notify_type, internal_behavior.scrn_behavior,
action_struct.scrn_action);
}
else if (notification_type == MMI_NOTIFY_SUBLCD)
{
}
else if (notification_type == MMI_NOTIFY_PREVIEW)
{
#ifdef __MMI_NCENTER_SUPPORT__
control_preview(noti_info->notify_type, noti_info->notification, NULL,
is_stop_text_preview);
if (noti_info->notification->option & MMI_FRM_NMGR_DISABLE_TONE)
{
is_stop_tone = MMI_TRUE;
}
if (noti_info->notification->option & MMI_FRM_NMGR_DISABLE_VIB)
{
is_stop_vib = MMI_TRUE;
}
#endif
}
else if (notification_type == MMI_NOTIFY_BALLOON)
{
#ifdef __COSMOS_MMI_PACKAGE__
display_scrn = control_balloon(noti_info->notify_type, noti_info-
>balloon_type, noti_info->string, NULL);
#endif
}
else if (notification_type == MMI_NOTIFY_ALERT)
{
/*Show notification by its alert type*/
if (noti_info->alert_info->behavior_mask == ALERT_TYPE_STATUS_BAR)
{/*Show status bar (text preview or balloon)*/
if(noti_info->alert_info->status_bar_para.status_bar_type ==
MMI_FRM_NMGR_ALERT_ST_PREVIEW_TYPE)
{/*text preview*/
#ifdef __MMI_NCENTER_SUPPORT__
mmi_frm_notification_para_struct temp_preview;
temp_preview.text = noti_info->alert_info->status_bar_para.display_string;
temp_preview.option = noti_info->alert_info->alert_option;
control_preview(noti_info->notify_type, &temp_preview, noti_info-
>alert_info, is_stop_text_preview);
#endif
}
if(noti_info->alert_info->status_bar_para.status_bar_type ==
MMI_FRM_NMGR_ALERT_ST_BALLOON_TYPE)
{/*balloon*/
#ifdef __COSMOS_MMI_PACKAGE__
display_scrn = control_balloon(noti_info->notify_type,
MMI_NMGR_BALLOON_TYPE_INFO,
(WCHAR *)noti_info->alert_info->status_bar_para.display_string, noti_info-
>alert_info);
#endif
}
}
if(noti_info->alert_info->behavior_mask == ALERT_TYPE_POPUP)
{ /*Show popup*/
mmi_noti_scrn_func_ptr popup_scrn_entry = nmgr_alert_general_popup;
void *popup_scrn_para = noti_info->alert_info;
display_scrn = control_app_screen(noti_info->noti_scen_id,
noti_scen.scrn_priority,
internal_behavior.scrn_behavior,
popup_scrn_entry,
popup_scrn_para,
action_struct.scrn_action,
noti_info->alert_info,
noti_info->notify_type);
}
/*Extract option for sound and vibration usage*/
if ( noti_info->alert_info->alert_option & MMI_FRM_NMGR_DISABLE_TONE)
{
is_stop_tone = MMI_TRUE;
}
if (noti_info->alert_info->alert_option & MMI_FRM_NMGR_DISABLE_VIB)
{
is_stop_vib = MMI_TRUE;
}
/*Extract the sound setting from NSS*/
#ifdef __MMI_NSS_SUPPORT__
mmi_srv_nss_get_setting(noti_info->alert_info->app_id, NSS_SETTING_SOUND,
&notification_setting_value);
if(notification_setting_value == SETTING_OFF)
{
is_stop_tone = MMI_TRUE;
}
#endif
/*According to UE design, we will show status bar icon even the NSS is
none or popup*/
if (noti_info->alert_info->behavior_mask == ALERT_TYPE_POPUP ||
noti_info->alert_info->behavior_mask == ALERT_TYPE_NONE)
{
control_status_icon(noti_info->alert_info->app_id,
noti_info->alert_info->alert_option,
noti_info->alert_info->status_bar_icon_para.icon_id
);
}
}
else
{
MMI_ASSERT(0);
}
control_sublcd(noti_info->noti_scen_id, internal_behavior.scrn_behavior);
if (!nmgr_is_in_defer_process() && !only_control_scrn)
{/* These three attribute should be invoked immediately! */
//add begin
/* compare scenario again */
active_scen_id = mmi_frm_get_active_scenario_id();
get_scenario_info(noti_info->noti_scen_id, &noti_scen);
get_scenario_info(active_scen_id, &active_scen);
compare_scenario_and_get_behavior(active_scen_id, noti_info->noti_scen_id,
&internal_behavior);
/* Get notify configuration information by user to decide the action of
each attribute. */
notify_event_info = mmi_nmgr_get_event_notify_info(noti_info->notify_type,
active_scen_id);
MMI_ASSERT(NULL != notify_event_info);
attri_action = notify_event_info->behavior;
parse_attri_action(attri_action, &action_struct);
//add end
if (notification_type != MMI_NOTIFY_BALLOON)
{
if (is_stop_tone == MMI_FALSE)
{
mmi_nmgr_sound_play_evt_struct sound_event;
MMI_FRM_INIT_EVENT(&sound_event, SOUND_PLAY_EVT);
sound_event.noti_scen_id = noti_info->noti_scen_id;
sound_event.tone_id = notify_event_info->tone_id;
sound_event.behavior = internal_behavior.snd_behavior;
sound_event.action = action_struct.snd_action;
sound_event.display_scrn = display_scrn;
if(noti_info->alert_info!=NULL)
{
memcpy(&sound_event.snd_info, &noti_info->alert_info->snd_para,
sizeof(mmi_frm_nmgr_alert_snd_struct));
if(sound_event.snd_info.sound_type == MMI_NMGR_SND_FILE_PATH)
{
sound_event.snd_info.sound.file_path =
mmi_frm_alloc_and_copy_string_to_nmgr_buff_internal(
noti_info->alert_info->snd_para.sound.file_path,MMI_MAX_FILE_NAME_LEN);
}
}
MMI_FRM_POST_EVENT(&sound_event, nmgr_control_proc, NULL);
}
if (is_stop_vib == MMI_FALSE)
{
mmi_nmgr_vib_play_evt_struct vib_event;
MMI_FRM_INIT_EVENT(&vib_event, VIB_PLAY_EVT);
vib_event.noti_scen_id = noti_info->noti_scen_id;
vib_event.behavior = internal_behavior.vib_behavior;
vib_event.action = action_struct.vib_action;
MMI_FRM_POST_EVENT(&vib_event, nmgr_control_proc, NULL);
}
}
if (!(notification_type == MMI_NOTIFY_BALLOON && display_scrn ==
MMI_FALSE))
{
mmi_nmgr_bl_ctrl_evt_struct bl_event;
MMI_FRM_INIT_EVENT(&bl_event,BACKLIGHT_CTRL);
bl_event.action = action_struct.bl_action;
bl_event.behavior = internal_behavior.bl_behavior;
MMI_FRM_POST_EVENT(&bl_event, nmgr_control_proc, NULL);
}
}
return display_scrn;
}
以上修改可以打patch MAUI_03207462。


您的分享是我們最大的動力!

-Advertisement-
Play Games
更多相關文章
  • V316處理器是全志科技面向高端4K運動相機市場推出的最新一代處理器,其採用最新一代HawkView6.0圖像處理器與4K Smart H.264/H.265視頻編碼器,內置硬體畸變矯正及電子防抖模塊,進一步提高運動相機產品畫質水平及錄像體驗,幫助客戶打造更具市場競爭力的智能創新產品。 全志V316 ...
  • 電子紙專用SoC晶元-B300,採用CPU+GPU混合架構,具備顯著的高性能、低功耗特點,內置電子紙顯示加速引擎、高速圖像處理引擎、低功耗管理控制系統,支持智能閱讀、筆記速寫、AI語控、圖像識別等功能,可實現一站式聽說讀寫譯應用 全志B300應用廣泛用於消費電子、商業顯示、智慧教育、智能醫療、新零售 ...
  • RK292X是一種低端平板電腦、Android攜帶型GPS等數字多媒體應用的低功耗高性能處理器解決方案,並將單核CortexA9與Neon和FPU協處理器以及128KBL2緩存集成在一起。 許多嵌入式強大的硬體引擎為高端應用程式提供了優化的性能。Rk292x支持1080p@60fps的幾乎全格式視頻 ...
  • 介紹 Tina wifi 管理開發介面和 Demo 代碼。 硬體平臺:AW R16、R8、R18、R58 及 R11系統版本:Tina v1.0 及以上版本 2. Wi-Fi manager 相關說明wifimanager 部分代碼是 Tina 平臺管理 wifi 與 AP 連接模塊。主要功能包括打 ...
  • 先總體佈局,有的佈局可以分為幾部分,比如頭部、中部、底部,代碼如上。 用include layout=""在佈局中引入其他的佈局,這樣結構就比較清楚,方便佈局模塊化,復用佈局。 簡單的,可以直接一個xml文件佈局。 ...
  • Hi3136是一款同時支持DVB-S(ETS 300 421)、DVB-S2(ETS 302 307)和DirecTV(ITU-R BO.1294 System B)標準的衛星數字電視通道接收晶元。晶元完成衛星數字信號從基帶採樣到MPEG-TS流輸出的全數字處理過程。在DVB-S2方面,晶元支持QP ...
  • QCA9379將先進的2x2雙頻802.11acMU-MIMO WiFi藍牙4.2結合在一塊高性能、小形狀的片上系統(SoC)中。支持增強的WiFi/Bluetooth與藍牙專用(第三個)天線共存。 QCA9379 SoC旨在將WLAN和藍牙低能(LEE)技術無縫集成在一種單晶元解決方案中,它提供了 ...
  • 眾所周知,一款沒有動畫的 app,就像沒有靈魂的肉體,給用戶的體驗性很差。現在的 android 在動畫效果方面早已空前的發展,1.View 動畫框架 2.屬性動畫框架 3.Drawable 動畫。相比後後兩者,View 動畫框架在 Android 的最開始就已經出現,即有著非常容易學習的有點,卻也... ...
一周排行
    -Advertisement-
    Play Games
  • 示例項目結構 在 Visual Studio 中創建一個 WinForms 應用程式後,項目結構如下所示: MyWinFormsApp/ │ ├───Properties/ │ └───Settings.settings │ ├───bin/ │ ├───Debug/ │ └───Release/ ...
  • [STAThread] 特性用於需要與 COM 組件交互的應用程式,尤其是依賴單線程模型(如 Windows Forms 應用程式)的組件。在 STA 模式下,線程擁有自己的消息迴圈,這對於處理用戶界面和某些 COM 組件是必要的。 [STAThread] static void Main(stri ...
  • 在WinForm中使用全局異常捕獲處理 在WinForm應用程式中,全局異常捕獲是確保程式穩定性的關鍵。通過在Program類的Main方法中設置全局異常處理,可以有效地捕獲並處理未預見的異常,從而避免程式崩潰。 註冊全局異常事件 [STAThread] static void Main() { / ...
  • 前言 給大家推薦一款開源的 Winform 控制項庫,可以幫助我們開發更加美觀、漂亮的 WinForm 界面。 項目介紹 SunnyUI.NET 是一個基於 .NET Framework 4.0+、.NET 6、.NET 7 和 .NET 8 的 WinForm 開源控制項庫,同時也提供了工具類庫、擴展 ...
  • 說明 該文章是屬於OverallAuth2.0系列文章,每周更新一篇該系列文章(從0到1完成系統開發)。 該系統文章,我會儘量說的非常詳細,做到不管新手、老手都能看懂。 說明:OverallAuth2.0 是一個簡單、易懂、功能強大的許可權+可視化流程管理系統。 有興趣的朋友,請關註我吧(*^▽^*) ...
  • 一、下載安裝 1.下載git 必須先下載並安裝git,再TortoiseGit下載安裝 git安裝參考教程:https://blog.csdn.net/mukes/article/details/115693833 2.TortoiseGit下載與安裝 TortoiseGit,Git客戶端,32/6 ...
  • 前言 在項目開發過程中,理解數據結構和演算法如同掌握蓋房子的秘訣。演算法不僅能幫助我們編寫高效、優質的代碼,還能解決項目中遇到的各種難題。 給大家推薦一個支持C#的開源免費、新手友好的數據結構與演算法入門教程:Hello演算法。 項目介紹 《Hello Algo》是一本開源免費、新手友好的數據結構與演算法入門 ...
  • 1.生成單個Proto.bat內容 @rem Copyright 2016, Google Inc. @rem All rights reserved. @rem @rem Redistribution and use in source and binary forms, with or with ...
  • 一:背景 1. 講故事 前段時間有位朋友找到我,說他的窗體程式在客戶這邊出現了卡死,讓我幫忙看下怎麼回事?dump也生成了,既然有dump了那就上 windbg 分析吧。 二:WinDbg 分析 1. 為什麼會卡死 窗體程式的卡死,入口門檻很低,後續往下分析就不一定了,不管怎麼說先用 !clrsta ...
  • 前言 人工智慧時代,人臉識別技術已成為安全驗證、身份識別和用戶交互的關鍵工具。 給大家推薦一款.NET 開源提供了強大的人臉識別 API,工具不僅易於集成,還具備高效處理能力。 本文將介紹一款如何利用這些API,為我們的項目添加智能識別的亮點。 項目介紹 GitHub 上擁有 1.2k 星標的 C# ...