欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  移动技术

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

程序员文章站 2022-03-22 12:41:28
跟综下来发现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。