free(pRingtone);
if(File::IsFileExist(value) == false)
{
- if(File::IsFileExist(L"/opt/share/settings/Ringtones/ringtone_sdk.mp3") == true)
+ char* pPreloaded = vconf_get_str(VCONFKEY_SETAPPL_CALL_RINGTONE_DEFAULT_PATH_STR);
+ SysTryReturnResult(NID_SYS, pPreloaded != null, E_SYSTEM, "It is failed to get default ringtone.");
+
+ String preloaded;
+ preloaded.Append(pPreloaded);
+
+ if(File::IsFileExist(preloaded) == true)
{
- value = L"/opt/share/settings/Ringtones/ringtone_sdk.mp3";
- system_settings_set_value_string(SYSTEM_SETTINGS_KEY_INCOMING_CALL_RINGTONE, "/opt/share/settings/Ringtones/ringtone_sdk.mp3");
+ value = preloaded;
+ errorCode = system_settings_set_value_string(SYSTEM_SETTINGS_KEY_INCOMING_CALL_RINGTONE, pPreloaded);
+ if(errorCode != SYSTEM_SETTINGS_ERROR_NONE)
+ {
+ SysLogException(NID_SYS, E_SYSTEM, "It is failed to set default ringtone.");
+ }
+
+ if(pPreloaded != null)
+ {
+ free(pPreloaded);
+ }
}
else
{
+ if(pPreloaded != null)
+ {
+ free(pPreloaded);
+ }
return E_SYSTEM;
}
}
if(File::IsFileExist(value) == false)
{
- if(File::IsFileExist( L"/opt/share/settings/Alerts/General notification_sdk.wav") == true)
+ char* pPreloaded = vconf_get_str(VCONFKEY_SETAPPL_NOTI_RINGTONE_DEFAULT_PATH_STR);
+ SysTryReturnResult(NID_SYS, pPreloaded != null, E_SYSTEM, "It is failed to get default noti ringtone.");
+
+ String preloaded;
+ preloaded.Append(pPreloaded);
+ if(File::IsFileExist(preloaded) == true)
{
- value = L"/opt/share/settings/Alerts/General notification_sdk.wav";
- errorCode = vconf_set_str(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, "/opt/share/settings/Alerts/General notification_sdk.wav");
+ value = preloaded;
+ errorCode = vconf_set_str(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, pPreloaded);
+ if(errorCode != 0)
+ {
+ SysLogException(NID_SYS, E_SYSTEM, "It is failed to set default noti ringtone.");
+ }
+
+ if(pPreloaded != null)
+ {
+ free(pPreloaded);
+ }
}
else
{
+ if(pPreloaded != null)
+ {
+ free(pPreloaded);
+ }
return E_SYSTEM;
}
}