bigbaicai

芯方式是以半导体人、电子工程师等电子行业相关领域从业人员为核心的知识经验学习、分享、交流社群。 凭借开放、合作、共赢的运营理念,聚集了来自国内外知名院校和顶尖科技公司的半导体人、电子工程师。 我们致力于营造专业、认真、有温度的分享交流环境,将高质量的内容和方案成规模地生产和分享,帮助个人和团队在芯方式找到有价值的Key。 http://www.icfans.com/

在Java屏幕来闹钟后alarm界面不消失

0
阅读(1346)

[DESCRIPTION]
Pluto项目中,在Java屏幕有闹钟到来,点击”Stop”或者”Snooze”之后,闹钟界面不消失。请参考如下方法修改。
[SOLUTION]
AlmStopHandler()和AlmSnoozeHandler()中把mmi_frm_group_close(GRP_ID_ALM_IND);和
srv_reminder_notify_finish(MMI_FALSE);交换位置。
例如半导体
void AlmStopHandler(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
alm_nvram_struct *alm_node;
U8 index = g_alm_cntx.active_alm_idx;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
MMI_ALM_TRACE2(MMI_ALM_STOP, 0, index);
StopTimer(ALARM_ALERT_NOTIFYDURATION_TIMER);
AlmCommonExitProcedure();
RETURN_IF_FAIL(index < NUM_OF_ALM);
alm_node = (alm_nvram_struct *)srv_alm_read(index);
/* factory alarm does not have to re-schedule */
alm_node->Snooze = 0;
if (alm_node->Freq == ALM_FREQ_ONCE)/* reset the alarm state */
{
alm_node->State = UNSET_STATE;
if (srv_alm_active_alms() == 0)
{
AlmDeactivateIndicator();
}
}
srv_alm_write(index, alm_node);
//mmi_frm_group_close(GRP_ID_ALM_IND);
srv_reminder_notify_finish(MMI_TRUE);
mmi_frm_group_close(GRP_ID_ALM_IND);//放到notify finish之后
g_alm_cntx.active_alm_idx = 0xFF;
}
2、
void AlmSnoozeHandler(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
alm_nvram_struct *alm_node;
U8 index = g_alm_cntx.active_alm_idx;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
MMI_ALM_TRACE1(MMI_ALM_SNOOZE, index);
if (mmi_frm_nmgr_is_scenario_deferred(MMI_SCENARIO_ID_REMINDER_ALARM,
mmi_alm_nmgr_expiry_callback,
NULL))
{
mmi_frm_nmgr_cancel_deferred_scenario(MMI_SCENARIO_ID_REMINDER_ALARM,
mmi_alm_nmgr_expiry_callback,
NULL);
}
StopTimer(ALARM_ALERT_NOTIFYDURATION_TIMER);
RETURN_IF_FAIL(index < NUM_OF_ALM);
alm_node = srv_alm_read(index);
AlmCommonExitProcedure();
if (alm_node->Snooze < MAX_SNOOZE_CHANCES)
{
//mmi_frm_group_close(GRP_ID_ALM_IND);
alm_node->Snooze++;
alm_node->State = SET_STATE;
srv_alm_write(index, alm_node);
srv_reminder_notify_finish(MMI_FALSE);
mmi_frm_group_close(GRP_ID_ALM_IND);//放到notify finish之后
g_alm_cntx.active_alm_idx = 0xFF;
}
icfans else
{
AlmStopHandler();
}
}