VideoLogDebug("call interrupt cb called");
PlayView *pPlayView = (PlayView *) user_data;
- int status = 0;
- telephony_call_state_e voice_status;
- telephony_call_state_e video_status;
+ int ret = TELEPHONY_ERROR_NONE;
+ telephony_call_h *call_list_sim;
+ telephony_call_status_e status;
+ telephony_call_type_e type;
+ telephony_error_e ret_sim;
+ unsigned int count_sim = 0;
VideoLogDebug("getting call status");
- status = telephony_call_get_voice_call_state(handle, &voice_status);
-
- if (status != TELEPHONY_ERROR_NONE) {
- VideoLogError("getting call status failed");
+ ret_sim =
+ telephony_call_get_call_list(handle, &count_sim,
+ &call_list_sim);
+ if (ret_sim != TELEPHONY_ERROR_NONE) {
+ VideoLogError("Cannot get call list information for the sim");
return;
}
- status = telephony_call_get_video_call_state(handle, &video_status);
-
- if (status != TELEPHONY_ERROR_NONE) {
- VideoLogError("getting video call status failed");
+ ret = telephony_call_get_status(*call_list_sim, &status);
+ if (ret != TELEPHONY_ERROR_NONE) {
+ VideoLogError("getting call status failed");
return;
}
- VideoLogDebug("voice_status = %d", voice_status);
- VideoLogDebug("video_status = %d", video_status);
+ VideoLogDebug("call status = %d", status);
- if (voice_status != TELEPHONY_CALL_STATE_IDLE
- || video_status != TELEPHONY_CALL_STATE_IDLE) {
+ telephony_call_release_call_list(count_sim, &call_list_sim);
+
+ if (status != TELEPHONY_CALL_STATE_IDLE) {
if (!vp_play_normal_view_pause(pPlayView->pNormalView)) {
VideoLogError("vp_play_normal_view_pause fail");
}
- } else if (voice_status == TELEPHONY_CALL_STATE_IDLE
- && video_status == TELEPHONY_CALL_STATE_IDLE) {
+ } else if (status == TELEPHONY_CALL_STATE_IDLE) {
bool bManualPause = FALSE;
vp_play_normal_view_get_manual_pause(pPlayView->pNormalView,
&bManualPause);
}
/*setting callbacks */
- telephony_h *newhandle = tel_list.handle;
- int api_err =
- telephony_set_noti_cb(*newhandle, TELEPHONY_NOTI_VOICE_CALL_STATE,
- (telephony_noti_cb)
- _call_async_event_callback,
- (void *) pUserData);
- if (api_err != TELEPHONY_ERROR_NONE) {
- VideoLogError
- ("tel_register_noti_event for voice call failed ( api_err : %d ) !!",
- api_err);
- }
+ for (int i=0;i<tel_list.count;i++) {
+ int api_err =
+ telephony_set_noti_cb(tel_list.handle[i], TELEPHONY_NOTI_VOICE_CALL_STATE,
+ (telephony_noti_cb)
+ _call_async_event_callback,
+ (void *) pUserData);
+ if (api_err != TELEPHONY_ERROR_NONE) {
+ VideoLogError
+ ("tel_register_noti_event for voice call failed ( api_err : %d ) !!",
+ api_err);
+ }
- api_err =
- telephony_set_noti_cb(*newhandle, TELEPHONY_NOTI_VIDEO_CALL_STATE,
- (telephony_noti_cb)
- _call_async_event_callback,
- (void *) pUserData);
- if (api_err != TELEPHONY_ERROR_NONE) {
- VideoLogError
- ("tel_register_noti_event for video call failed ( api_err : %d ) !!",
- api_err);
+ api_err =
+ telephony_set_noti_cb(tel_list.handle[i], TELEPHONY_NOTI_VIDEO_CALL_STATE,
+ (telephony_noti_cb)
+ _call_async_event_callback,
+ (void *) pUserData);
+ if (api_err != TELEPHONY_ERROR_NONE) {
+ VideoLogError
+ ("tel_register_noti_event for video call failed ( api_err : %d ) !!",
+ api_err);
+ }
}
return TRUE;
tmpTitle = g_strdup_printf(VIDEOS_DELETEPOP_HEADER_DELETE);
elm_object_part_text_set(pPopUpHandle, "title,text", tmpTitle);
+ if (tmpTitle) {
+ free(tmpTitle);
+ tmpTitle = NULL;
+
+ }
if (viewType == MP_LIST_VIEW_AS_FOLDER_LIST) {
VideoLogInfo("All folders are selected to delete");
}
elm_object_part_text_set(pPopUpHandle, "default", tmpStr);
+ if (tmpStr) {
+ free(tmpStr);
+ tmpStr = NULL;
+ }
pButton = elm_button_add(pPopUpHandle);
elm_object_domain_translatable_text_set(pButton, VIDEOS_STRING,
tmpTitle = g_strdup_printf(VIDEOS_DELETEPOP_HEADER_DELETE);
elm_object_part_text_set(pPopUpHandle, "title,text", tmpTitle);
+ if (tmpTitle) {
+ free(tmpTitle);
+ tmpTitle = NULL;
+ }
if (nSelected < -1) { /* select videos */
if (viewType == MP_LIST_VIEW_AS_FOLDER_LIST) {
}
}
elm_object_part_text_set(pPopUpHandle, "default", tmpStr);
+ if (tmpStr) {
+ free(tmpStr);
+ tmpStr = NULL;
+ }
pButton = elm_button_add(pPopUpHandle);
elm_object_domain_translatable_text_set(pButton, VIDEOS_STRING,
bool mp_util_call_off(void)
{
- telephony_call_state_e state = TELEPHONY_CALL_STATE_IDLE;
telephony_handle_list_s tel_list;
+ telephony_call_h *call_list_sim;
+ telephony_call_status_e status = TELEPHONY_CALL_STATE_IDLE;
+ telephony_call_type_e type;
+ unsigned int count_sim[2] = {0};
+ int ret = TELEPHONY_ERROR_NONE;
+
int tel_valid = telephony_init(&tel_list);
if (tel_valid != TELEPHONY_ERROR_NONE) {
VideoLogError("telephony is not initialized. ERROR Code is %d",
return TRUE;
}
- telephony_h *newhandle = tel_list.handle;
- int s = telephony_call_get_voice_call_state(*newhandle, &state);
- telephony_deinit(&tel_list);
+ for (int i=0;i<tel_list.count;i++) {
+ ret =
+ telephony_call_get_call_list(tel_list.handle[i], &count_sim[i],
+ &call_list_sim);
+ if (ret != TELEPHONY_ERROR_NONE) {
+ VideoLogError("Cannot get call list information for the sim");
+ return TRUE;
+ }
- if (s == TELEPHONY_ERROR_NONE) {
- if (state == TELEPHONY_CALL_STATE_IDLE) {
+ ret = telephony_call_get_status(*call_list_sim, &status);
+ if (ret != TELEPHONY_ERROR_NONE) {
+ VideoLogError("getting call status failed");
return TRUE;
- } else {
+ }
+ VideoLogDebug("call status = %d", status);
+
+ telephony_call_release_call_list(count_sim[i], &call_list_sim);
+ }
+ telephony_deinit(&tel_list);
+
+ if (ret == TELEPHONY_ERROR_NONE) {
+ if (status != TELEPHONY_CALL_STATE_IDLE) {
return FALSE;
}
- } else {
- VideoLogError("ERROR: state error is %d", s);
}
+
return TRUE;
}