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

相关文章

Linux进程CPU绑定优化与实践过程

《Linux进程CPU绑定优化与实践过程》Linux支持进程绑定至特定CPU核心,通过sched_setaffinity系统调用和taskset工具实现,优化缓存效率与上下文切换,提升多核计算性能,适... 目录1. 多核处理器及并行计算概念1.1 多核处理器架构概述1.2 并行计算的含义及重要性1.3 并

Spring boot整合dubbo+zookeeper的详细过程

《Springboot整合dubbo+zookeeper的详细过程》本文讲解SpringBoot整合Dubbo与Zookeeper实现API、Provider、Consumer模式,包含依赖配置、... 目录Spring boot整合dubbo+zookeeper1.创建父工程2.父工程引入依赖3.创建ap

Linux下进程的CPU配置与线程绑定过程

《Linux下进程的CPU配置与线程绑定过程》本文介绍Linux系统中基于进程和线程的CPU配置方法,通过taskset命令和pthread库调整亲和力,将进程/线程绑定到特定CPU核心以优化资源分配... 目录1 基于进程的CPU配置1.1 对CPU亲和力的配置1.2 绑定进程到指定CPU核上运行2 基于

Java进程异常故障定位及排查过程

《Java进程异常故障定位及排查过程》:本文主要介绍Java进程异常故障定位及排查过程,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录一、故障发现与初步判断1. 监控系统告警2. 日志初步分析二、核心排查工具与步骤1. 进程状态检查2. CPU 飙升问题3. 内存

SpringBoot整合liteflow的详细过程

《SpringBoot整合liteflow的详细过程》:本文主要介绍SpringBoot整合liteflow的详细过程,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋...  liteflow 是什么? 能做什么?总之一句话:能帮你规范写代码逻辑 ,编排并解耦业务逻辑,代码

Java中调用数据库存储过程的示例代码

《Java中调用数据库存储过程的示例代码》本文介绍Java通过JDBC调用数据库存储过程的方法,涵盖参数类型、执行步骤及数据库差异,需注意异常处理与资源管理,以优化性能并实现复杂业务逻辑,感兴趣的朋友... 目录一、存储过程概述二、Java调用存储过程的基本javascript步骤三、Java调用存储过程示

MySQL中的InnoDB单表访问过程

《MySQL中的InnoDB单表访问过程》:本文主要介绍MySQL中的InnoDB单表访问过程,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录1、背景2、环境3、访问类型【1】const【2】ref【3】ref_or_null【4】range【5】index【6】

浏览器插件cursor实现自动注册、续杯的详细过程

《浏览器插件cursor实现自动注册、续杯的详细过程》Cursor简易注册助手脚本通过自动化邮箱填写和验证码获取流程,大大简化了Cursor的注册过程,它不仅提高了注册效率,还通过友好的用户界面和详细... 目录前言功能概述使用方法安装脚本使用流程邮箱输入页面验证码页面实战演示技术实现核心功能实现1. 随机

Navicat数据表的数据添加,删除及使用sql完成数据的添加过程

《Navicat数据表的数据添加,删除及使用sql完成数据的添加过程》:本文主要介绍Navicat数据表的数据添加,删除及使用sql完成数据的添加过程,具有很好的参考价值,希望对大家有所帮助,如有... 目录Navicat数据表数据添加,删除及使用sql完成数据添加选中操作的表则出现如下界面,查看左下角从左

CSS3打造的现代交互式登录界面详细实现过程

《CSS3打造的现代交互式登录界面详细实现过程》本文介绍CSS3和jQuery在登录界面设计中的应用,涵盖动画、选择器、自定义字体及盒模型技术,提升界面美观与交互性,同时优化性能和可访问性,感兴趣的朋... 目录1. css3用户登录界面设计概述1.1 用户界面设计的重要性1.2 CSS3的新特性与优势1.