[DESCRIPTION]
1.FM后台播放;
2.进audioplayer,播放歌曲;
3.停止播放,推出audioplayer;
4.FM不能被resume。
[SOLUTION]
半导体问题原因:在进audioplayer时,会suspend FM,而audioplayer并没有stop的按键,只有pause,且退出audioplayer时
没有调用resume
函数去恢复FM;
修改方法:
在mmi_audply_delete_history_hdlr里开始处添加
if(g_audply.state == STATE_PAUSED)
mmi_audply_stop_playing();
和结尾处添加mdi_audio_resume_background_play();
修改如下:
static mmi_ret mmi_audply_delete_history_hdlr(mmi_event_struct *in_param)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if(g_audply.state == STATE_PAUSED)
mmi_audply_stop_playing();
switch (in_param->evt_id)
{
case EVT_ID_SCRN_DEINIT :
{
#ifdef __MMI_NCENTER_SUPPORT__
#endif
#ifdef __DM_LAWMO_SUPPORT__
if (TRUE == mmi_dmui_is_phone_lock())
{
mmi_audply_stop_playing();
mdi_audio_clear_background_handler(MDI_BACKGROUND_APP_AUDPLY);
}
else
#endif
if (!g_audply.background_play)
{
// There is a case that state = STATE_IDLE and need_replay = TRUE
// and we need to prevent from replay after this function call by setting need_replay =
FALSE
g_audply.need_replay = MMI_FALSE;
mmi_audply_stop_playing();
mdi_audio_clear_background_handler(MDI_BACKGROUND_APP_AUDPLY);
g_mmi_audply_longpressed = MMI_FALSE ;
}
else //background_play
{
if(g_audply.state == STATE_PLAY || g_audply.wait_next == MMI_TRUE ||
g_audply.wait_next_with_pop_up == MMI_TRUE #ifdef __MMI_A2DP_SUPPORT__
|| mmi_audply_is_wait_open_bt() #endif
)
{
//bql: why clear all application background play except request application itself
and POC
mdi_audio_clear_other_background_handler(MDI_BACKGROUND_APP_AUDPLY);
}
else
{
if(g_audply.need_replay == MMI_FALSE)
{ /*during background call, press end key to stop call and entry idle
screen,should not clear.*/
mdi_audio_clear_background_handler(MDI_BACKGROUND_APP_AUDPLY);
}
}
}
g_audply.in_audio_player = MMI_FALSE;
mdi_audio_resume_background_play();
}
break;
default:
break;
}
return MMI_RET_OK;
}