FAQ-MT6250,11B1132MP,录音过程中来闹铃,没有铃声

2024-03-08 16:32

本文主要是介绍FAQ-MT6250,11B1132MP,录音过程中来闹铃,没有铃声,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

跟综下来发现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。http://bbs.16rd.com/thread-476762-1-1.html

这篇关于FAQ-MT6250,11B1132MP,录音过程中来闹铃,没有铃声的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/787692

相关文章

HTML5 getUserMedia API网页录音实现指南示例小结

《HTML5getUserMediaAPI网页录音实现指南示例小结》本教程将指导你如何利用这一API,结合WebAudioAPI,实现网页录音功能,从获取音频流到处理和保存录音,整个过程将逐步... 目录1. html5 getUserMedia API简介1.1 API概念与历史1.2 功能与优势1.3

canal实现mysql数据同步的详细过程

《canal实现mysql数据同步的详细过程》:本文主要介绍canal实现mysql数据同步的详细过程,本文通过实例图文相结合给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的... 目录1、canal下载2、mysql同步用户创建和授权3、canal admin安装和启动4、canal

MySQL存储过程之循环遍历查询的结果集详解

《MySQL存储过程之循环遍历查询的结果集详解》:本文主要介绍MySQL存储过程之循环遍历查询的结果集,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录前言1. 表结构2. 存储过程3. 关于存储过程的SQL补充总结前言近来碰到这样一个问题:在生产上导入的数据发现

SpringBoot集成LiteFlow实现轻量级工作流引擎的详细过程

《SpringBoot集成LiteFlow实现轻量级工作流引擎的详细过程》LiteFlow是一款专注于逻辑驱动流程编排的轻量级框架,它以组件化方式快速构建和执行业务流程,有效解耦复杂业务逻辑,下面给大... 目录一、基础概念1.1 组件(Component)1.2 规则(Rule)1.3 上下文(Conte

Spring Boot 整合 Apache Flink 的详细过程

《SpringBoot整合ApacheFlink的详细过程》ApacheFlink是一个高性能的分布式流处理框架,而SpringBoot提供了快速构建企业级应用的能力,下面给大家介绍Spri... 目录Spring Boot 整合 Apache Flink 教程一、背景与目标二、环境准备三、创建项目 & 添

pytest+allure环境搭建+自动化实践过程

《pytest+allure环境搭建+自动化实践过程》:本文主要介绍pytest+allure环境搭建+自动化实践过程,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐... 目录一、pytest下载安装1.1、安装pytest1.2、检测是否安装成功二、allure下载安装2.

Pytorch介绍与安装过程

《Pytorch介绍与安装过程》PyTorch因其直观的设计、卓越的灵活性以及强大的动态计算图功能,迅速在学术界和工业界获得了广泛认可,成为当前深度学习研究和开发的主流工具之一,本文给大家介绍Pyto... 目录1、Pytorch介绍1.1、核心理念1.2、核心组件与功能1.3、适用场景与优势总结1.4、优

Redis指南及6.2.x版本安装过程

《Redis指南及6.2.x版本安装过程》Redis是完全开源免费的,遵守BSD协议,是一个高性能(NOSQL)的key-value数据库,Redis是一个开源的使用ANSIC语言编写、支持网络、... 目录概述Redis特点Redis应用场景缓存缓存分布式会话分布式锁社交网络最新列表Redis各版本介绍旧

SpringBoot整合Sa-Token实现RBAC权限模型的过程解析

《SpringBoot整合Sa-Token实现RBAC权限模型的过程解析》:本文主要介绍SpringBoot整合Sa-Token实现RBAC权限模型的过程解析,本文给大家介绍的非常详细,对大家的学... 目录前言一、基础概念1.1 RBAC模型核心概念1.2 Sa-Token核心功能1.3 环境准备二、表结

Jvm sandbox mock机制的实践过程

《Jvmsandboxmock机制的实践过程》:本文主要介绍Jvmsandboxmock机制的实践过程,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录一、背景二、定义一个损坏的钟1、 Springboot工程中创建一个Clock类2、 添加一个Controller