From: Kamil Lipiszko Date: Wed, 4 Jan 2017 13:00:35 +0000 (+0100) Subject: [Ring] Use alarm's ringtone and volume. X-Git-Tag: submit/tizen/20170120.120822~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F89%2F108489%2F3;p=profile%2Fmobile%2Fapps%2Fnative%2Fclock.git [Ring] Use alarm's ringtone and volume. Change-Id: I9ae0308f74809267ba6c13bf7501dc1769ef490a --- diff --git a/clock/src/Model/Ring.cpp b/clock/src/Model/Ring.cpp index e056c58..dbc5956 100644 --- a/clock/src/Model/Ring.cpp +++ b/clock/src/Model/Ring.cpp @@ -17,6 +17,9 @@ #include "Model/Ring.h" #include "Utils/SoundManager.h" #include "Utils/FeedbackManager.h" +#include "Utils/Utils.h" + +#define DEFAULT_SOUND_PATH "ringtones/alarm.mp3" namespace model { @@ -88,10 +91,11 @@ namespace model { void Ring::SoundPlay() { if (alarm_) - utils::SoundManager::SoundPlay("/opt/share/settings/Ringtones/ringtone_sdk.mp3"); - //utils::SoundManager::SoundPlay(alarm_->GetMelody()); TODO + utils::SoundManager::SoundPlay(alarm_->GetMelody(), alarm_->GetVolume()); else - utils::SoundManager::SoundPlay("/opt/share/settings/Ringtones/ringtone_sdk.mp3"); + utils::SoundManager::SoundPlay( + utils::Utils::GetAppResourcePath( + utils::Utils::APP_DIR_SHARED_RESOURCE, DEFAULT_SOUND_PATH)); } void Ring::SoundStop()