==================================================================================================*/
-void MsgSoundPlayStart()
+void MsgSoundPlayStart(bool isEmergency)
{
MSG_BEGIN();
{
MSG_DEBUG("Child Process - Run helper app for Sound");
- execl("/usr/bin/msg-helper", MSG_SOUND_START, NULL);
+ if (isEmergency)
+ execl("/usr/bin/msg-helper", MSG_EMERGENCY_SOUND_START, NULL);
+ else
+ execl("/usr/bin/msg-helper", MSG_NORMAL_SOUND_START, NULL);
MSG_DEBUG("Faild to run helper app for Sound");
alarmmgr_set_type(alarm_info, ALARM_TYPE_VOLATILE);
alarmmgr_add_alarm_with_localtime(alarm_info, NULL, &g_alarmId);
- retval = alarmmgr_set_cb(MsgSoundRepeatAlarmCB, NULL);
+ retval = alarmmgr_set_cb(MsgSoundRepeatAlarmCB, (void *)alarm_info);
if (retval != 0)
{
{
MSG_BEGIN();
+ alarm_info_t *alarm_info = (alarm_info_t *)pUserParam;
+
g_bRepeat = false;
- if (MsgSoundGetUnreadMsgCnt() <= 0)
- {
+ if (MsgSoundGetUnreadMsgCnt() <= 0) {
MSG_DEBUG("no unread msg");
-
- return 0;
+ } else {
+ MsgSoundPlayStart(false);
}
- MsgSoundPlayStart();
+ if (alarmmgr_free_alarm(alarm_info) != ALARMMGR_RESULT_SUCCESS)
+ MSG_DEBUG("alarmmgr_free_alarm is failed");
MSG_END();
MSG_DEBUG("nRepeatTime = %d", nRepeatTime);
if (nRepeatTime > 0)
- MsgSoundPlayStart();
+ MsgSoundPlayStart(false);
MSG_END();
}