dbg("_callmgr_ringer_destroy_ringtone_stream()");
CM_RETURN_VAL_IF_FAIL(ringer_handle, -1);
+ if (ringer_handle->ringtone_stream_handle == NULL) {
+ warn("No ringtone_stream_handle");
+ return -1;
+ }
+
ret = sound_manager_release_focus(ringer_handle->ringtone_stream_handle, SOUND_STREAM_FOCUS_FOR_PLAYBACK|SOUND_STREAM_FOCUS_FOR_RECORDING, SOUND_BEHAVIOR_NONE, NULL);
if (ret != SOUND_MANAGER_ERROR_NONE) {
- err("sound_manager_release_focus() get failed with err[%d]", ret);
+ err("sound_manager_release_focus() get failed with err[%d][%s]", ret, get_error_message(ret));
}
ret = sound_manager_destroy_stream_information(ringer_handle->ringtone_stream_handle);
CM_RETURN_VAL_IF_FAIL(ringer_handle, -1);
+ if (ringer_handle->player_handle == NULL) {
+ warn("No player_handle");
+ return -1;
+ }
+
if (ringer_handle->increment_timer != 0) {
g_source_remove(ringer_handle->increment_timer);
ringer_handle->increment_timer = 0;
}
- CM_RETURN_VAL_IF_FAIL(ringer_handle->player_handle, -1);
-
player_get_state(ringer_handle->player_handle, &player_state);
info("current player state = %d", player_state);
{
dbg("..");
CM_RETURN_VAL_IF_FAIL(ringer_handle, -1);
- CM_RETURN_VAL_IF_FAIL(ringer_handle->haptic_handle, -1);
+
+ if (ringer_handle->haptic_handle == NULL) {
+ warn("No haptic_handle");
+ return -1;
+ }
if (ringer_handle->vibration_timer != 0) {
info("vib_timer_id removing..");
CM_RETURN_VAL_IF_FAIL(ringer_handle, -1);
if (ringer_handle->ringback_tone_play_handle == -1) {
- err("Wrong handle to stop tone_player");
+ warn("No ringback_tone_play_handle");
return -1;
}
CM_RETURN_VAL_IF_FAIL(ringer_handle, -1);
+ /* Stop melody if exist */
__callmgr_ringer_stop_melody(ringer_handle);
+
+ /* Stop vibration if exist */
__callmgr_ringer_stop_vibration(ringer_handle);
+
ringer_handle->current_status = CM_RINGER_STATUS_IDLE_E;
return 0;
CM_RETURN_VAL_IF_FAIL(ringer_handle, -1);
if (ringer_handle->alternate_tone_handle == -1) {
- err("Invalid tone handle");
-
+ warn("No alternate_tone_handle");
return -1;
}
int sound_manager_ret = SOUND_MANAGER_ERROR_NONE;
char *effect_path = NULL;
+ dbg("effect_type: [%s]", effect_type == CM_RINGER_EFFECT_CONNECT_TONE_E ? "CONNECT_TONE" : "DISCONNECT_TONE");
+
ringer_handle->play_effect_cb_fn = cb_fn;
ringer_handle->play_effect_user_data = user_data;
dbg("_callmgr_ringer_stop_effect");
if (ringer_handle->play_effect_handle < 0) {
- err("Invalid handle");
+ warn("No play_effect_handle");
return -1;
}
/* Reset value */
core_data->is_video_recording = FALSE;
- /* Stop ringtone */
+ /* Stop alternate tone if exist */
_callmgr_ringer_stop_alternate_tone(core_data->ringer_handle);
+
+ /* Stop ringtone if exist */
_callmgr_ringer_stop_alert(core_data->ringer_handle);
- /* Stop motion sensor */
+ /* Stop motion sensor if exist */
_callmgr_sensor_face_down_stop(core_data->sensor_handle);
}
__callmgr_core_cancel_auto_answer(core_data);
__callmgr_core_stop_incom_noti(core_data);
+ /* Destroy ringtone stream if MT call is terminated */
_callmgr_ringer_destroy_ringtone_stream(core_data->ringer_handle);
_callmgr_ringer_stop_local_ringback_tone(core_data->ringer_handle);