2 * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include "MsgCallStatusManager.h"
21 #include "MsgCppTypes.h"
22 #include "MsgGconfWrapper.h"
23 #include "MsgSettingTypes.h"
24 #include "MsgDrmWrapper.h"
25 #include "MsgSensorWrapper.h"
26 #include "MsgUtilFile.h"
27 #include "MsgStorageTypes.h"
28 #include "MsgContact.h"
30 #include "MsgNotificationWrapper.h"
31 #include "MsgSoundPlayer.h"
33 #ifndef MSG_WEARABLE_PROFILE
37 #include <mm_player.h>
38 #include <mm_session_private.h>
43 #include <feedback-internal.h>
45 /*==================================================================================================
47 ==================================================================================================*/
48 #define MAX_SOUND_FILE_LEN 1024
50 #define DEFAULT_ALERT_FILE "/opt/usr/share/settings/Alerts/Whistle.ogg"
52 #define HAPTIC_TEST_ITERATION 1
53 #define MSG_VIBRATION_INTERVAL 3000
54 #define MSG_SOUND_TIMEOUT 5500
57 /*==================================================================================================
59 ==================================================================================================*/
61 MMHandleType hPlayerHandle = 0;
64 pthread_mutex_t muMmPlay = PTHREAD_MUTEX_INITIALIZER;
66 #endif /* MSG_WEARABLE_PROFILE */
68 /*==================================================================================================
69 IMPLEMENTATION OF Functions
70 ==================================================================================================*/
71 void MsgSoundRepeatAlarmCB(int alarmId)
75 #ifndef MSG_WEARABLE_PROFILE
77 MsgSoundPlayer::instance()->MsgSoundInitRepeatAlarm();
79 #endif /* MSG_WEARABLE_PROFILE */
86 void MsgSensorCBStop()
90 #ifndef MSG_WEARABLE_PROFILE
93 MsgSoundPlayer::instance()->MsgSoundPlayStop();
95 MsgDeleteNotification(MSG_NOTI_TYPE_ALL, -1);
97 MsgRefreshNotification(MSG_NOTI_TYPE_ALL, false, MSG_ACTIVE_NOTI_TYPE_NONE);
99 #ifndef MSG_NOTI_INTEGRATION
100 MsgRefreshNotification(MSG_NOTI_TYPE_SIM, false, MSG_ACTIVE_NOTI_TYPE_NONE);
105 #endif /* MSG_WEARABLE_PROFILE */
111 static gboolean MsgSoundMelodyTimeout(gpointer data)
115 MsgSoundPlayer::instance()->MsgSoundPlayStop();
124 static int MsgSoundPlayCallback(int message, void *param, void *user_param)
127 #ifndef MSG_WEARABLE_PROFILE
129 case MM_MESSAGE_BEGIN_OF_STREAM:
130 MSG_DEBUG("Play is started.");
132 case MM_MESSAGE_END_OF_STREAM:
133 case MM_MESSAGE_STATE_INTERRUPTED:
134 MSG_DEBUG("EOS or Interrupted.");
135 MsgSoundPlayer::instance()->MsgSoundPlayStop();
137 case MM_MESSAGE_FILE_NOT_SUPPORTED:
138 case MM_MESSAGE_FILE_NOT_FOUND:
139 case MM_MESSAGE_DRM_NOT_AUTHORIZED:
140 case MM_MESSAGE_ERROR:
141 MSG_DEBUG("message [%d] & play with default", message);
142 MsgSoundPlayer::instance()->MsgSoundPlayStart(NULL, MSG_SOUND_PLAY_DEFAULT);
145 MSG_DEBUG("message [%d]", message);
148 #endif /* MSG_WEARABLE_PROFILE */
154 /*==================================================================================================
155 IMPLEMENTATION OF MsgSoundPlayer - Member Functions
156 ==================================================================================================*/
157 MsgSoundPlayer* MsgSoundPlayer::pInstance = NULL;
160 MsgSoundPlayer::MsgSoundPlayer()
163 #ifndef MSG_WEARABLE_PROFILE
166 bFeedbackInit = false;
169 defaultRingtonePath = NULL;
171 defaultRingtonePath = MsgSettingGetString(VCONFKEY_SETAPPL_NOTI_RINGTONE_DEFAULT_PATH_STR);
173 if (defaultRingtonePath == NULL || MsgGetFileSize(defaultRingtonePath) < 1) {
174 defaultRingtonePath = (char *)DEFAULT_ALERT_FILE;
177 MSG_DEBUG("defaultRingtonePath [%s]", defaultRingtonePath);
179 if (MsgSensorConnect() == MSG_SUCCESS) {
180 if (MsgRegSensorCB(&MsgSensorCBStop) != MSG_SUCCESS) {
181 MSG_DEBUG("Fail to MsgRegSensorCB.");
182 MsgSensorDisconnect();
185 MSG_DEBUG("Fail to MsgSensorConnect.");
187 #endif /* MSG_WEARABLE_PROFILE */
192 MsgSoundPlayer::~MsgSoundPlayer()
197 MsgSoundPlayer* MsgSoundPlayer::instance()
200 MSG_DEBUG("pInstance is NULL. Now creating instance.");
201 pInstance = new MsgSoundPlayer();
208 void MsgSoundPlayer::MsgGetRingtonePath(char *userRingtonePath, char **msg_tone_file_path_p)
210 #ifndef MSG_WEARABLE_PROFILE
211 MSG_RINGTONE_TYPE_T ringtoneType = (MSG_RINGTONE_TYPE_T)MsgSettingGetInt(MSG_SETTING_RINGTONE_TYPE);
213 MSG_DEBUG("Ringtone type = [%d]", ringtoneType);
215 if (ringtoneType == MSG_RINGTONE_TYPE_SILENT) {
216 *msg_tone_file_path_p = NULL;
220 char *tmpFilePath = NULL;
221 *msg_tone_file_path_p = new char[MSG_FILEPATH_LEN_MAX+1];
223 char *msg_tone_file_path = *msg_tone_file_path_p;
225 bool bUserRingtone = userRingtonePath && userRingtonePath[0] != '\0';
227 tmpFilePath = userRingtonePath;
229 if (ringtoneType == MSG_RINGTONE_TYPE_DEFAULT) {
230 tmpFilePath = MsgSettingGetString(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR);
232 tmpFilePath = MsgSettingGetString(MSG_SETTING_RINGTONE_PATH);
236 memset(msg_tone_file_path, 0x00, sizeof(char)*(MSG_FILEPATH_LEN_MAX+1));
238 if ((tmpFilePath == NULL || MsgGetFileSize(tmpFilePath) < 1) || /* wrong ringtone file path */
239 (MsgDrmIsDrmFile(tmpFilePath) && !MsgDrmCheckRingtone(tmpFilePath))) { /* check DRM */
240 if (tmpFilePath && (strcmp(tmpFilePath, "silent") == 0)) {
241 MSG_DEBUG("Set ringtone to NONE(Silent)");
242 msg_tone_file_path = NULL;
244 MSG_DEBUG("Set ringtone to defaultRingtonePath.");
245 strncpy(msg_tone_file_path, defaultRingtonePath, MSG_FILEPATH_LEN_MAX);
248 MSG_DEBUG("Set ringtone to tmpFilePath.");
249 snprintf(msg_tone_file_path, MSG_FILEPATH_LEN_MAX, "%s", tmpFilePath);
252 if (tmpFilePath && !bUserRingtone) {
256 #endif /* MSG_WEARABLE_PROFILE */
259 #ifndef MSG_WEARABLE_PROFILE
260 void MsgSoundPlayer::MsgGetPlayStatus(bool bOnCall, bool bSound, bool bVibration, bool bMsgSound, bool bMsgVibration, bool *bPlaySound, bool *bPlayVibration)
264 /* samsung basic concept : feedback should follow profile setting.
265 * And if notification setting exist in msg app, then apply it prior to profile when profile either sound or vibration.
266 * But, Play sound when profile is vibration during call, if device does not support haptic */
267 if (bSound || bVibration) {
268 bool bHantic_device = false;
269 #ifdef FEATURE_HAPTIC_ENABLE
270 bHantic_device = true;
272 if (bHantic_device || (bOnCall == false)) {
275 MSG_DEBUG("Play sound.");
280 MSG_DEBUG("Play vibration.");
281 *bPlayVibration = true;
285 MSG_DEBUG("Play vibration.");
286 *bPlayVibration = true;
289 } else { /* during call */
290 if (bMsgSound || bMsgVibration) {
291 MSG_DEBUG("Play sound.");
297 #endif /* MSG_WEARABLE_PROFILE */
299 void MsgSoundPlayer::MsgGetPlayStatus(bool bVoiceMail, bool *bPlaySound, bool *bPlayVibration, bool *bOnCall)
303 #ifndef MSG_WEARABLE_PROFILE
305 if (!bPlaySound || !bPlayVibration || !bOnCall) {
306 MSG_DEBUG("IN parameter is NULL.");
311 *bPlayVibration = false;
315 bool bSoundOn = false; /* sound setting on notification panel */
316 bool bVibrationOn = false; /* vibration setting on notification panel */
318 MsgSettingGetBool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, &bSoundOn);
319 MsgSettingGetBool(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, &bVibrationOn);
322 #if 0 /* not used value */
323 bool bNotiVibrationOn = false; /* alert vibration */
324 MsgSettingGetBool(VCONFKEY_SETAPPL_VIBRATE_WHEN_NOTIFICATION_BOOL, &bNotiVibrationOn);
327 bool bMsgSettingNoti = true; /* Alert for message notification */
328 bool bMsgSettingVibration = false; /* vibration for message notification */
330 MSG_RINGTONE_TYPE_T ringtoneType = MSG_RINGTONE_TYPE_DEFAULT; /*sound type for message notification */
331 bool bMsgSettingSound = true;
333 MsgSettingGetBool(MSG_SETTING_VIBRATION, &bMsgSettingVibration);
334 MsgSettingGetBool(MSG_SETTING_NOTIFICATION, &bMsgSettingNoti);
335 ringtoneType = (MSG_RINGTONE_TYPE_T)MsgSettingGetInt(MSG_SETTING_RINGTONE_TYPE);
336 if (ringtoneType == MSG_RINGTONE_TYPE_SILENT)
337 bMsgSettingSound = false;
339 MSG_SEC_DEBUG("Sound status : Sound mode[%d], Manner mode[%d]", bSoundOn, bVibrationOn);
340 MSG_SEC_DEBUG("Msg Setting : Noti Alert[%d], vibration[%d], sound[%d], ringtoneType[%d]", bMsgSettingNoti, bMsgSettingVibration, bMsgSettingSound, ringtoneType);
343 /* int alertOnCall = 0; */
345 callStatus = MsgGetCallStatus();
346 MSG_DEBUG("Call Status [%d]", callStatus);
348 /* Check call status */
349 if (callStatus > 0 && callStatus < 3) {
351 *bOnCall = true; /* set call status; */
353 /* 2. Call is not active */
355 MSG_DEBUG("Call is not active.");
356 int voiceRecording = MsgSettingGetInt(VCONFKEY_RECORDER_STATE);
358 if (bVoiceMail) { /* 2-1. Voice message */
359 if (bMsgSettingNoti) {
360 MsgGetPlayStatus(false, bSoundOn, bVibrationOn, bMsgSettingSound, bMsgSettingVibration, bPlaySound, bPlayVibration);
363 MSG_DEBUG("It doesn't play sound/vibration - voice message.");
365 } else { /* 2-1. Normal message */
366 if (bMsgSettingNoti) {
367 if (voiceRecording != VCONFKEY_RECORDER_STATE_RECORDING) {
368 MsgGetPlayStatus(false, bSoundOn, bVibrationOn, bMsgSettingSound, bMsgSettingVibration, bPlaySound, bPlayVibration);
370 MSG_DEBUG("It doesn't play sound/vibration.");
373 MSG_DEBUG("It doesn't play sound/vibration.");
378 #endif /* MSG_WEARABLE_PROFILE */
384 void MsgSoundPlayer::MsgSoundPlayStart(const MSG_ADDRESS_INFO_S *pAddrInfo, MSG_SOUND_TYPE_T soundType)
388 #ifndef MSG_WEARABLE_PROFILE
390 MSG_DEBUG("soundType [%d]", soundType);
392 /* check camera state */
393 int cameraState = 0; /* camera recording state */
394 cameraState = MsgSettingGetInt(VCONFKEY_CAMERA_STATE);
395 MSG_SEC_DEBUG("Camera state [%d]", cameraState);
397 if (cameraState == VCONFKEY_CAMERA_STATE_RECORDING) {
402 /* contacts-service is not used for gear */
403 #ifndef MSG_CONTACTS_SERVICE_NOT_SUPPORTED
404 /* get contact information */
405 MSG_CONTACT_INFO_S contactInfo;
406 memset(&contactInfo, 0x00, sizeof(MSG_CONTACT_INFO_S));
409 /* Get Contact Info */
410 if (MsgGetContactInfo(pAddrInfo, &contactInfo) != MSG_SUCCESS) {
411 MSG_DEBUG("MsgGetContactInfo() fail.");
414 #endif /* MSG_CONTACTS_SERVICE_NOT_SUPPORTED */
415 /* get ringtone file path */
416 char *msg_tone_file_path = NULL;
417 unique_ptr<char*, void(*)(char**)> buf(&msg_tone_file_path, unique_ptr_deleter);
419 if (soundType == MSG_SOUND_PLAY_EMERGENCY) {
420 msg_tone_file_path = new char[MAX_SOUND_FILE_LEN+1];
421 memset(msg_tone_file_path, 0x00, sizeof(char)*(MAX_SOUND_FILE_LEN+1));
422 } else if (soundType == MSG_SOUND_PLAY_DEFAULT) {
423 msg_tone_file_path = new char[MAX_SOUND_FILE_LEN+1];
424 memset(msg_tone_file_path, 0x00, sizeof(char)*(MAX_SOUND_FILE_LEN+1));
425 strncpy(msg_tone_file_path, DEFAULT_ALERT_FILE, MAX_SOUND_FILE_LEN);
427 /* contacts-service is not used for gear */
428 #ifndef MSG_CONTACTS_SERVICE_NOT_SUPPORTED
430 MsgGetRingtonePath(contactInfo.alerttonePath, &msg_tone_file_path);
432 #endif /* MSG_CONTACTS_SERVICE_NOT_SUPPORTED */
433 MSG_SEC_DEBUG("soundType [%d], Sound File [%s]", soundType, msg_tone_file_path);
435 /* get sound play status */
436 bool bPlaySound = false;
437 bool bPlayVibration = false;
438 bool bVoiceMsg = (soundType == MSG_SOUND_PLAY_VOICEMAIL)?true:false;
439 bool bOnCall = false;
441 MsgGetPlayStatus(bVoiceMsg, &bPlaySound, &bPlayVibration, &bOnCall);
443 MSG_SEC_DEBUG("sound=[%d], vibration=[%d], voice_msg?[%d], on_call?[%d]",
444 bPlaySound, bPlayVibration, bVoiceMsg, bOnCall);
448 int err = MM_ERROR_NONE;
450 if (soundType == MSG_SOUND_PLAY_EMERGENCY)
451 err = mm_session_init(MM_SESSION_TYPE_EMERGENCY);
453 err = mm_session_init(MM_SESSION_TYPE_NOTIFY);
455 if (err != MM_ERROR_NONE)
456 MSG_DEBUG("MM Session Init Failed");
458 MSG_DEBUG("MM Session Init Success : %d", err);
461 MsgSoundPlayMelody(msg_tone_file_path);
463 err = mm_session_finish();
465 if (err != MM_ERROR_NONE)
466 MSG_DEBUG("MM Session Finish Failed.");
468 MSG_DEBUG("MM Session Finish Success : %d", err);
471 /* contacts-service is not used for gear */
472 #ifndef MSG_CONTACTS_SERVICE_NOT_SUPPORTED
474 if (bPlayVibration) {
475 MsgSoundPlayVibration(contactInfo.vibrationPath);
477 #endif /* MSG_CONTACTS_SERVICE_NOT_SUPPORTED */
479 /* For repeatition. */
480 /* MsgSoundSetRepeatAlarm(); */
482 #endif /* MSG_WEARABLE_PROFILE */
488 void MsgSoundPlayer::MsgSoundPlayStop()
492 #ifndef MSG_WEARABLE_PROFILE
494 pthread_mutex_lock(&muMmPlay);
496 if (bPlaying == true && hPlayerHandle != 0) {
497 MSG_DEBUG("stopping the player.");
498 /* Stop playing media contents */
499 int err = mm_player_stop(hPlayerHandle);
501 if (err != MM_ERROR_NONE)
502 MSG_DEBUG("stopping the player handle failed");
505 if (hPlayerHandle != 0) {
506 MSG_DEBUG("destroy the player.");
508 /* Uninitializing the player module */
509 mm_player_unrealize(hPlayerHandle);
511 /* Destroying the player handle */
512 mm_player_destroy(hPlayerHandle);
518 pthread_mutex_unlock(&muMmPlay);
520 #endif /* MSG_WEARABLE_PROFILE */
526 void MsgSoundPlayer::MsgSoundPlayMelody(char *pMsgToneFilePath)
528 #ifndef MSG_WEARABLE_PROFILE
530 int err = MM_ERROR_NONE;
532 if (!pMsgToneFilePath) {
533 MSG_DEBUG("Ringtone path is NULL");
537 pthread_mutex_lock(&muMmPlay);
539 if (hPlayerHandle != 0) {
540 mm_player_unrealize(hPlayerHandle);
541 mm_player_destroy(hPlayerHandle);
545 err = mm_player_create(&hPlayerHandle);
547 pthread_mutex_unlock(&muMmPlay);
549 if (err != MM_ERROR_NONE) {
550 MSG_DEBUG("creating the player handle failed");
554 /* Setting the call back function msg_callback */
555 mm_player_set_message_callback(hPlayerHandle, MsgSoundPlayCallback, NULL);
558 /* Setting fade in/out, Volume */
559 err = mm_player_set_attribute(hPlayerHandle, NULL,
560 "sound_volume_type", MM_SOUND_VOLUME_TYPE_NOTIFICATION,
561 "profile_uri", pMsgToneFilePath, strlen(pMsgToneFilePath),
565 if (err != MM_ERROR_NONE)
566 MSG_DEBUG("error setting the profile attr [%d]", err);
568 err = mm_player_realize(hPlayerHandle);
570 if (err != MM_ERROR_NONE) {
571 MSG_DEBUG("mm_player_realize() error : [%d]", err);
572 if (pMsgToneFilePath != defaultRingtonePath) {
573 pMsgToneFilePath = defaultRingtonePath;
578 } while (err != MM_ERROR_NONE);
581 pthread_mutex_lock(&muMmPlay);
582 MSG_DEBUG("mm_player_start with [%s]", pMsgToneFilePath);
583 err = mm_player_start(hPlayerHandle);
585 if (err != MM_ERROR_NONE) {
586 MSG_DEBUG("mm_player_start, FAIL [%x]", err);
588 /* Add Timer to stop playing after 5 sec. */
590 int g_contact_timer = -1;
591 g_contact_timer = g_timeout_add(MSG_SOUND_TIMEOUT, (GSourceFunc)MsgSoundMelodyTimeout, NULL);
596 pthread_mutex_unlock(&muMmPlay);
598 #endif /* MSG_WEARABLE_PROFILE */
603 void MsgSoundPlayer::MsgSoundPlayVibration(char *vibrationPath)
607 #ifndef MSG_WEARABLE_PROFILE
611 if (!bFeedbackInit) {
612 int ret = feedback_initialize();
614 if (ret != FEEDBACK_ERROR_NONE) {
615 MSG_DEBUG("Fail to feedback_initialize : [%d]", ret);
616 bFeedbackInit = false;
619 MSG_DEBUG("Success to feedback_initialize.");
620 bFeedbackInit = true;
624 if (vibrationPath && strlen(vibrationPath)) {
625 MSG_DEBUG("vibrationPath: [%s]", vibrationPath);
626 ret = feedback_set_resource_path(FEEDBACK_TYPE_VIBRATION, FEEDBACK_PATTERN_MESSAGE, vibrationPath);
627 if (ret != FEEDBACK_ERROR_NONE)
628 MSG_DEBUG("Fail to feedback_set_resource_path");
629 ret = feedback_play_type(FEEDBACK_TYPE_VIBRATION, FEEDBACK_PATTERN_MESSAGE);
631 if (ret != FEEDBACK_ERROR_NONE)
632 MSG_DEBUG("Fail to feedback_play_type");
634 ret = feedback_set_resource_path(FEEDBACK_TYPE_VIBRATION, FEEDBACK_PATTERN_MESSAGE, NULL);
635 if (ret != FEEDBACK_ERROR_NONE)
636 MSG_DEBUG("Fail to feedback_set_resource_path");
638 ret = feedback_play_type(FEEDBACK_TYPE_VIBRATION, FEEDBACK_PATTERN_MESSAGE);
639 if (ret != FEEDBACK_ERROR_NONE)
640 MSG_DEBUG("Fail to feedback_play_type");
643 #endif /* MSG_WEARABLE_PROFILE */
648 void MsgSoundPlayer::MsgSoundPlayDtmf()
652 #ifndef MSG_WEARABLE_PROFILE
657 ret = mm_sound_play_tone(MM_SOUND_TONE_PROP_BEEP2, VOLUME_TYPE_SYSTEM, 1.0, 300, &hToneHandle);
660 MSG_DEBUG("play tone failed.");
662 MSG_DEBUG("play tone success.");
665 #endif /* MSG_WEARABLE_PROFILE */
671 void MsgSoundPlayer::MsgSoundSetRepeatAlarm()
673 #ifndef MSG_WEARABLE_PROFILE
675 int nRepeatValue = 0;
676 long nRepeatTime = 0;
678 nRepeatValue = MsgSettingGetInt(MSG_ALERT_REP_TYPE);
680 switch (nRepeatValue) {
681 case MSG_ALERT_TONE_ONCE:
685 case MSG_ALERT_TONE_2MINS:
689 case MSG_ALERT_TONE_5MINS:
693 case MSG_ALERT_TONE_10MINS:
698 MSG_DEBUG("Invalid Repetition time");
702 MSG_DEBUG("nRepeatTime = %d", nRepeatTime);
704 if (nRepeatTime > 0) {
706 if (MsgAlarmRemove(g_alarmId) != MSG_SUCCESS)
707 MSG_FATAL("MsgAlarmRemove fail.");
711 MsgSoundCreateRepeatAlarm(nRepeatTime);
714 #endif /* MSG_WEARABLE_PROFILE */
718 void MsgSoundPlayer::MsgSoundCreateRepeatAlarm(int RepeatTime)
722 #ifndef MSG_WEARABLE_PROFILE
730 tmp_time += (RepeatTime*60);
732 localtime_r(&tmp_time, &repeat_tm);
734 if (MsgAlarmRegistration(&repeat_tm, MsgSoundRepeatAlarmCB, &alarmId) != MSG_SUCCESS) {
735 MSG_DEBUG("MsgAlarmRegistration fail.");
740 MSG_DEBUG("Set g_alarmId to [%d]", alarmId);
744 #endif /* MSG_WEARABLE_PROFILE */
748 int MsgSoundPlayer::MsgSoundGetUnreadMsgCnt()
752 #ifndef MSG_WEARABLE_PROFILE
755 unreadCnt = MsgSettingGetInt(VCONFKEY_MESSAGE_RECV_SMS_STATE);
758 unreadCnt += MsgSettingGetInt(VCONFKEY_MESSAGE_RECV_MMS_STATE);
760 MSG_DEBUG("unread count : [%d]", unreadCnt);
762 #endif /* MSG_WEARABLE_PROFILE */
767 void MsgSoundPlayer::MsgSoundInitRepeatAlarm()
771 #ifndef MSG_WEARABLE_PROFILE
773 int nRepeatValue = 0;
774 long nRepeatTime = 0;
778 if (MsgSoundGetUnreadMsgCnt() <= 0) {
779 MSG_DEBUG("no unread msg");
783 nRepeatValue = MsgSettingGetInt(MSG_ALERT_REP_TYPE);
785 switch (nRepeatValue) {
786 case MSG_ALERT_TONE_ONCE:
790 case MSG_ALERT_TONE_2MINS:
794 case MSG_ALERT_TONE_5MINS:
798 case MSG_ALERT_TONE_10MINS:
803 MSG_DEBUG("Invalid Repetition time");
807 MSG_DEBUG("nRepeatTime = %d", nRepeatTime);
810 MsgSoundPlayStart(NULL, MSG_SOUND_PLAY_USER);
812 #endif /* MSG_WEARABLE_PROFILE */