From: Igor Olshevskyi Date: Tue, 19 Apr 2016 11:29:42 +0000 (+0300) Subject: TizenRefApp-6150 [Call] Refactor application launch functionality X-Git-Tag: submit/tizen_mobile/20160428.142720^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c3ba837aea7a1f6020992dfaa90d5ecd69c4a914;p=profile%2Fmobile%2Fapps%2Fnative%2Fcall-ui.git TizenRefApp-6150 [Call] Refactor application launch functionality Change-Id: Ica451ac56b89a1794bb274f10cbc7d4eb9cb8214 --- diff --git a/inc/callui-common-def.h b/inc/callui-common-def.h index 331a95c..842f52e 100644 --- a/inc/callui-common-def.h +++ b/inc/callui-common-def.h @@ -36,8 +36,6 @@ #define _EDJ(obj) elm_layout_edje_get(obj) #endif -#define MSG_PKG "org.tizen.message" - #undef _ #define _(s) gettext(s) diff --git a/inc/callui-common.h b/inc/callui-common.h index 29be66a..7e42600 100644 --- a/inc/callui-common.h +++ b/inc/callui-common.h @@ -67,23 +67,24 @@ int _callui_common_unlock_swipe_lock(void); void _callui_common_win_set_noti_type(void *appdata, bool win_noti); /** - * @brief Launch contacts application + * @brief Launch bluetooth application * * @param[in] appdata App data * */ -void _callui_common_launch_contacts(void *appdata); +void _callui_common_launch_setting_bluetooth(void *appdata); /** - * @brief Launch bluetooth application + * @brief Launch Composer of Message application * * @param[in] appdata App data + * @param[in] number Phone number * */ -void _callui_common_launch_bt_app(void *appdata); +void _callui_common_launch_msg_composer(void *appdata, const char *number); /** - * @brief Launch dialer application + * @brief Launch Dialer of Phone application * * @param[in] appdata App data * @@ -91,13 +92,12 @@ void _callui_common_launch_bt_app(void *appdata); void _callui_common_launch_dialer(void *appdata); /** - * @brief Launch message application + * @brief Launch Contacts application * * @param[in] appdata App data - * @param[in] number Phone number * */ -void _callui_common_launch_msg_composer(void *appdata, const char *number); +void _callui_common_launch_contacts(void *appdata); /** * @brief Reset main layout text fields diff --git a/src/callui-action-bar.c b/src/callui-action-bar.c index b7d7db7..18d9937 100644 --- a/src/callui-action-bar.c +++ b/src/callui-action-bar.c @@ -29,7 +29,7 @@ #include "callui-state-provider.h" #include "callui-view-caller-info-defines.h" -#define PART_SWALLOW_ACTION_BAR "action_bar" +#define PART_SWALLOW_ACTION_BAR "action_bar" typedef enum { CALLUI_ACTION_BTN_SPEAKER = 0, @@ -222,7 +222,7 @@ static void __bluetooth_btn_click_cb(void *data, Evas_Object *obj, void *event_i if (bt_state == BT_ADAPTER_DISABLED) { _callui_load_bluetooth_popup(ad); } else { - _callui_common_launch_bt_app(ad); + _callui_common_launch_setting_bluetooth(ad); } } else { err("Fail to get vconf key: %d", ret_code); diff --git a/src/callui-common.c b/src/callui-common.c index 13945d3..5d63d19 100755 --- a/src/callui-common.c +++ b/src/callui-common.c @@ -44,11 +44,17 @@ #include "callui-sound-manager.h" #include "callui-state-provider.h" -#define CONTACT_PKG "org.tizen.contacts" -#define PHONE_PKG "org.tizen.phone" -#define BLUETOOTH_PKG "ug-bluetooth-efl" +#define BLUETOOTH_PKG "ug-bluetooth-efl" +#define CONTACTS_PKG "org.tizen.contacts" + +#define PHONE_TELEPHONE_URI "tel:" +#define PHONE_LAUNCH_TYPE_PARAM_NAME "launch_type" +#define PHONE_LAUNCH_TYPE_VALUE "add_call" + +#define MESSAGE_SMS_URI "sms:" #define TIME_BUF_LEN (16) +#define CONTACT_NUMBER_BUF_LEN 32 static bool g_is_headset_connected; @@ -158,155 +164,113 @@ void _callui_common_win_set_noti_type(void *appdata, bool win_noti) } } -void _callui_common_launch_contacts(void *appdata) +static void __reset_visibility_properties(callui_app_data_t *ad) { - dbg(".."); - app_control_h service; - callui_app_data_t *ad = appdata; _callui_lock_manager_stop(ad->lock_handle); ad->start_lock_manager_on_resume = true; - _callui_common_win_set_noti_type(appdata, false); - - int ret = app_control_create(&service); - if (ret < 0) { - err("app_control_create() return error : %d", ret); - return; - } - - if (app_control_set_app_id(service, CONTACT_PKG) != APP_CONTROL_ERROR_NONE) { - err("app_control_set_app_id() is failed"); - } else if (app_control_set_operation(service, APP_CONTROL_OPERATION_DEFAULT) != APP_CONTROL_ERROR_NONE) { - err("app_control_set_operation() is failed"); - } else if (app_control_send_launch_request(service, NULL, NULL) != APP_CONTROL_ERROR_NONE) { - err("app_control_send_launch_request() is failed"); - } - - app_control_destroy(service); + _callui_common_win_set_noti_type(ad, false); } -void _callui_common_launch_bt_app(void *appdata) +void _callui_common_launch_setting_bluetooth(void *appdata) { - dbg(".."); - app_control_h service; - callui_app_data_t *ad = appdata; - _callui_lock_manager_stop(ad->lock_handle); - ad->start_lock_manager_on_resume = true; + CALLUI_RETURN_IF_FAIL(appdata); - _callui_common_win_set_noti_type(appdata, false); + callui_app_data_t *ad = appdata; - int ret = app_control_create(&service); - if (ret < 0) { - err("app_control_create() return error : %d", ret); - return; + app_control_h app_control = NULL; + int ret; + if ((ret = app_control_create(&app_control)) != APP_CONTROL_ERROR_NONE) { + err("app_control_create() is failed. ret[%d]", ret); + } else if ((ret = app_control_set_app_id(app_control, BLUETOOTH_PKG)) != APP_CONTROL_ERROR_NONE) { + err("app_control_set_app_id() is failed. ret[%d]", ret); + } else if ((ret = app_control_set_operation(app_control, APP_CONTROL_OPERATION_PICK)) != APP_CONTROL_ERROR_NONE) { + err("app_control_set_operation() is failed. ret[%d]", ret); + } else if ((ret = app_control_send_launch_request(app_control, NULL, NULL)) != APP_CONTROL_ERROR_NONE) { + err("app_control_send_launch_request() is failed. ret[%d]", ret); + } else { + __reset_visibility_properties(ad); } - - if (app_control_set_app_id(service, BLUETOOTH_PKG) != APP_CONTROL_ERROR_NONE) { - err("app_control_set_app_id() is failed"); - } else if (app_control_set_operation(service, APP_CONTROL_OPERATION_PICK) != APP_CONTROL_ERROR_NONE) { - err("app_control_set_operation() is failed"); - } else if (app_control_send_launch_request(service, NULL, NULL) != APP_CONTROL_ERROR_NONE) { - err("app_control_send_launch_request() is failed"); + if (app_control) { + app_control_destroy(app_control); } - - app_control_destroy(service); } void _callui_common_launch_dialer(void *appdata) { - app_control_h service = NULL; - int ret = APP_CONTROL_ERROR_NONE; - char *uri = NULL; + CALLUI_RETURN_IF_FAIL(appdata); callui_app_data_t *ad = appdata; - _callui_lock_manager_stop(ad->lock_handle); - ad->start_lock_manager_on_resume = true; - - _callui_common_win_set_noti_type(appdata, false); - - ret = app_control_create(&service); - if (ret < 0) { - err("app_control_create() return error : %d", ret); - return; - } - uri = (char *)calloc(5, sizeof(char)); - if (uri == NULL) { - err("memory alloc failed"); - app_control_destroy(service); - return; + app_control_h app_control = NULL; + int ret; + if ((ret = app_control_create(&app_control)) != APP_CONTROL_ERROR_NONE) { + err("app_control_create() is failed. ret[%d]", ret); + } else if ((ret = app_control_set_operation(app_control, APP_CONTROL_OPERATION_DIAL)) != APP_CONTROL_ERROR_NONE) { + err("app_control_set_operation() is failed. ret[%d]", ret); + } else if ((ret = app_control_set_uri(app_control, PHONE_TELEPHONE_URI)) != APP_CONTROL_ERROR_NONE) { + err("app_control_set_uri() is failed. ret[%d]", ret); + } else if ((ret = app_control_add_extra_data(app_control, PHONE_LAUNCH_TYPE_PARAM_NAME, PHONE_LAUNCH_TYPE_VALUE)) != APP_CONTROL_ERROR_NONE) { + err("app_control_add_extra_data() is failed. ret[%d]", ret); + } else if ((ret = app_control_send_launch_request(app_control, NULL, NULL)) != APP_CONTROL_ERROR_NONE) { + err("app_control_send_launch_request() is failed. ret[%d]", ret); + } else { + __reset_visibility_properties(ad); } - snprintf(uri, sizeof(char)*5, "%s", "tel:"); - - if (app_control_set_app_id(service, PHONE_PKG) != APP_CONTROL_ERROR_NONE) { - err("app_control_set_app_id() is failed"); - } else if (app_control_set_operation(service, APP_CONTROL_OPERATION_DIAL) != APP_CONTROL_ERROR_NONE) { - err("app_control_set_operation() is failed"); - } else if (app_control_set_uri(service, uri) != APP_CONTROL_ERROR_NONE) { - err("app_control_set_uri() is failed"); - } else if (app_control_add_extra_data(service, "launch_type", "add_call") != APP_CONTROL_ERROR_NONE) { - err("app_control_add_extra_data() is failed"); - } else if (app_control_send_launch_request(service, NULL, NULL) != APP_CONTROL_ERROR_NONE) { - err("app_control_send_launch_request() is failed"); + if (app_control){ + app_control_destroy(app_control); } - - app_control_destroy(service); - free(uri); - - return; } -void _callui_common_launch_msg_composer(void *appdata, const char *number) +void _callui_common_launch_contacts(void *appdata) { - dbg(".."); - - app_control_h service; - int ret = APP_CONTROL_ERROR_NONE; + CALLUI_RETURN_IF_FAIL(appdata); callui_app_data_t *ad = appdata; - _callui_lock_manager_stop(ad->lock_handle); - ad->start_lock_manager_on_resume = true; - - _callui_common_win_set_noti_type(appdata, false); - ret = app_control_create(&service); - if (ret != APP_CONTROL_ERROR_NONE) { - warn("app_control_create() return error : %d", ret); - return; + app_control_h app_control = NULL; + int ret; + if ((ret = app_control_create(&app_control)) != APP_CONTROL_ERROR_NONE) { + err("app_control_create() is failed. ret[%d]", ret); + } else if ((ret = app_control_set_app_id(app_control, CONTACTS_PKG)) != APP_CONTROL_ERROR_NONE) { + err("app_control_set_app_id() is failed. ret[%d]", ret); + } else if ((ret = app_control_set_operation(app_control, APP_CONTROL_OPERATION_DEFAULT)) != APP_CONTROL_ERROR_NONE) { + err("app_control_set_operation() is failed. ret[%d]", ret); + } else if ((ret = app_control_send_launch_request(app_control, NULL, NULL)) != APP_CONTROL_ERROR_NONE) { + err("app_control_send_launch_request() is failed. ret[%d]", ret); + } else { + __reset_visibility_properties(ad); } - - ret = app_control_set_app_id(service, MSG_PKG); - if (ret != APP_CONTROL_ERROR_NONE) { - warn("app_control_set_app_id() return error : %d", ret); - ret = app_control_destroy(service); - return; + if (app_control) { + app_control_destroy(app_control); } +} - if (number) { - ret = app_control_add_extra_data(service, "type", "compose"); - if (ret != APP_CONTROL_ERROR_NONE) { - warn("app_control_add_extra_data() return error : %d", ret); - ret = app_control_destroy(service); - return; - } +void _callui_common_launch_msg_composer(void *appdata, const char *number) +{ + CALLUI_RETURN_IF_FAIL(appdata); - if (strlen(number) > 0) { - const char *array[] = { number }; - ret = app_control_add_extra_data_array(service, APP_CONTROL_DATA_TO, array, 1); - if (ret != APP_CONTROL_ERROR_NONE) { - warn("app_control_add_extra_data() return error : %d", ret); - ret = app_control_destroy(service); - return; - } - } - } + callui_app_data_t *ad = appdata; - ret = app_control_send_launch_request(service, NULL, NULL); - if (ret != APP_CONTROL_ERROR_NONE) { - warn("app_control_send_launch_request() is failed : %d", ret); + char str[CONTACT_NUMBER_BUF_LEN]; + snprintf(str, sizeof(str), "%s%s", MESSAGE_SMS_URI, number); + + app_control_h app_control = NULL; + int ret; + if ((ret = app_control_create(&app_control)) != APP_CONTROL_ERROR_NONE) { + err("app_control_create() failed. ret[%d]", ret); + } else if ((ret = app_control_set_operation(app_control, APP_CONTROL_OPERATION_COMPOSE)) != APP_CONTROL_ERROR_NONE) { + err("app_control_set_operation() is failed. ret[%d]", ret); + } else if ((ret = app_control_set_uri(app_control, str)) != APP_CONTROL_ERROR_NONE) { + err("app_control_set_uri() is failed. ret[%d]", ret); + } else if ((ret = app_control_send_launch_request(app_control, NULL, NULL)) != APP_CONTROL_ERROR_NONE) { + err("app_control_send_launch_request() is failed. ret[%d]", ret); + } else { + __reset_visibility_properties(ad); + } + if (app_control) { + app_control_destroy(app_control); } - - app_control_destroy(service); } void _callui_common_reset_main_ly_text_fields(Evas_Object *contents) diff --git a/src/callui-view-callend.c b/src/callui-view-callend.c index b50b52f..61e09ba 100644 --- a/src/callui-view-callend.c +++ b/src/callui-view-callend.c @@ -27,7 +27,6 @@ #include "callui-state-provider.h" #define APP_CONTROL_MIME_CONTACT "application/vnd.tizen.contact" -#define CONTACT_NUMBER_BUF_LEN 32 #define OUTGOING_CALL_TIME_DURATION_STR "00:00" #define ENDING_TIMER_INTERVAL 2.0 #define BLINKING_TIMER_INTERVAL 0.5 @@ -80,6 +79,8 @@ static void __set_conference_call_info(callui_view_callend_h vd, const callui_ca static void __bg_mouse_down_cb(void *data, Evas_Object *o, const char *emission, const char *source); +static void __launch_contact_app(const char *operation, const char *call_number); + callui_view_callend_h _callui_view_callend_new() { callui_view_callend_h callend_view = calloc(1, sizeof(_callui_view_callend_t)); @@ -319,53 +320,53 @@ static char *__vcui_endcall_get_item_text(void *data, Evas_Object *obj, const ch return NULL; } +static void __launch_contact_app(const char *operation, const char *call_number) +{ + app_control_h app_control = NULL; + int ret; + if ((ret = app_control_create(&app_control)) != APP_CONTROL_ERROR_NONE) { + err("app_control_create() is failed. ret[%d]", ret); + } else if ((ret = app_control_set_operation(app_control, operation)) != APP_CONTROL_ERROR_NONE) { + err("app_control_set_operation() is failed. ret[%d]", ret); + } else if ((ret = app_control_set_mime(app_control, APP_CONTROL_MIME_CONTACT)) != APP_CONTROL_ERROR_NONE) { + err("app_control_set_mime() is failed. ret[%d]", ret); + } else if ((ret = app_control_add_extra_data(app_control, APP_CONTROL_DATA_PHONE, call_number)) != APP_CONTROL_ERROR_NONE) { + err("app_control_add_extra_data() is failed. ret[%d]", ret); + } else if ((ret = app_control_send_launch_request(app_control, NULL, NULL)) != APP_CONTROL_ERROR_NONE) { + err("app_control_send_launch_request() is failed. ret[%d]", ret); + } + if (app_control) { + app_control_destroy(app_control); + } +} + static void __create_contact_btn_click_cb(void *data, Evas_Object *obj, void *event_info) { CALLUI_RETURN_IF_FAIL(data); - callui_view_callend_h vd = (callui_view_callend_h)data; - _callui_common_exit_app(); + callui_view_callend_h vd = data; - // TODO: Need to replace into launcher - app_control_h request; - app_control_create(&request); - app_control_set_operation(request, APP_CONTROL_OPERATION_ADD); - app_control_set_mime(request, APP_CONTROL_MIME_CONTACT); - app_control_add_extra_data(request, APP_CONTROL_DATA_PHONE, vd->call_number); + _callui_common_exit_app(); - int err = app_control_send_launch_request(request, NULL, NULL); - if (err != APP_CONTROL_ERROR_NONE) { - dbg("app_control_send_launch_request() is failed"); - } - app_control_destroy(request); + __launch_contact_app(APP_CONTROL_OPERATION_ADD, vd->call_number); } static void __update_contact_btn_click_cb(void *data, Evas_Object *obj, void *event_info) { CALLUI_RETURN_IF_FAIL(data); - callui_view_callend_h vd = (callui_view_callend_h)data; - _callui_common_exit_app(); + callui_view_callend_h vd = data; - // TODO: Need to replace into launcher - app_control_h request; - app_control_create(&request); - app_control_set_operation(request, APP_CONTROL_OPERATION_EDIT); - app_control_set_mime(request, APP_CONTROL_MIME_CONTACT); - app_control_add_extra_data(request, APP_CONTROL_DATA_PHONE, vd->call_number); + _callui_common_exit_app(); - int result = app_control_send_launch_request(request, NULL, NULL); - if (result != APP_CONTROL_ERROR_NONE) { - err("app_control_send_launch_request() failed (%d)", result); - } - app_control_destroy(request); + __launch_contact_app(APP_CONTROL_OPERATION_EDIT, vd->call_number); } static void __popup_back_click_cb(void *data, Evas_Object *obj, void *event_info) { CALLUI_RETURN_IF_FAIL(data); - callui_view_callend_h vd = (callui_view_callend_h)data; + callui_view_callend_h vd = data; evas_object_del(obj); @@ -420,22 +421,12 @@ static void __add_contact_btn_click_cb(void *data, Evas *evas, Evas_Object *obj, static void __msg_btn_click_cb(void *data, Evas_Object *obj, const char *emission, const char *source) { CALLUI_RETURN_IF_FAIL(data); - callui_view_callend_h vd = (callui_view_callend_h)data; + callui_view_callend_h vd = data; + callui_app_data_t *ad = vd->base_view.ad; edje_object_signal_callback_del_full(_EDJ(obj), "clicked", "edje", __msg_btn_click_cb, vd); - app_control_h request; - app_control_create(&request); - app_control_set_operation(request, APP_CONTROL_OPERATION_COMPOSE); - char str[CONTACT_NUMBER_BUF_LEN]; - snprintf(str, sizeof(str), "sms:%s", vd->call_number); - app_control_set_uri(request, str); - - int result = app_control_send_launch_request(request, NULL, NULL); - if (result != APP_CONTROL_ERROR_NONE) { - err("app_control_send_launch_request() failed (%d)", result); - } - app_control_destroy(request); + _callui_common_launch_msg_composer(ad, vd->call_number); } static Eina_Bool __ending_timer_expired_cb(void *data) diff --git a/src/callui-view-elements.c b/src/callui-view-elements.c index 110cbb6..82554f7 100755 --- a/src/callui-view-elements.c +++ b/src/callui-view-elements.c @@ -44,7 +44,6 @@ #define POPUP_LIST_ITEM_H 120 #define APP_CONTROL_MIME_CONTACT "application/vnd.tizen.contact" #define CONTACT_ID_BUF_LEN 16 -#define CONTACT_NUMBER_BUF_LEN 32 typedef struct { int index; @@ -703,7 +702,7 @@ static void __callui_bt_popup_ok_btn_cb(void *data, Evas_Object *obj, void *even __callui_unload_bt_popup(ad); /* Launch the BT App Control */ - _callui_common_launch_bt_app(ad); + _callui_common_launch_setting_bluetooth(ad); return; } diff --git a/src/callui-view-incoming-call-noti.c b/src/callui-view-incoming-call-noti.c index 0ce2394..f857094 100644 --- a/src/callui-view-incoming-call-noti.c +++ b/src/callui-view-incoming-call-noti.c @@ -357,24 +357,24 @@ static void __create_reject_msg_content(callui_view_incoming_call_noti_h vd) static void __launch_btn_click_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info) { - char *key = (char *) data; - if (key == NULL) { - return; - } + CALLUI_RETURN_IF_FAIL(data); + + char *key = (char *)data; - //TODO: replace to separate launcher app_control_h app_control = NULL; - if (app_control_create(&app_control) != APP_CONTROL_ERROR_NONE) { - dbg("app_control_create() is failed"); - } else if (app_control_set_app_id(app_control, "org.tizen.call-ui") != APP_CONTROL_ERROR_NONE) { - dbg("app_control_set_app_id() is failed"); - } else if (app_control_set_operation(app_control, key) != APP_CONTROL_ERROR_NONE) { - dbg("app_control_set_operation() is failed"); - } else if (app_control_send_launch_request(app_control, NULL, NULL) != APP_CONTROL_ERROR_NONE) { - err("app_control_send_launch_request() is failed"); + int ret; + if ((ret = app_control_create(&app_control)) != APP_CONTROL_ERROR_NONE) { + err("app_control_create() is failed. ret[%d]", ret); + } else if (app_control_set_app_id(app_control, PACKAGE) != APP_CONTROL_ERROR_NONE) { + err("app_control_set_app_id() is failed. ret[%d]", ret); + } else if ((ret = app_control_set_operation(app_control, key)) != APP_CONTROL_ERROR_NONE) { + err("app_control_set_operation() is failed. ret[%d]", ret); + } else if ((ret = app_control_send_launch_request(app_control, NULL, NULL)) != APP_CONTROL_ERROR_NONE) { + err("app_control_send_launch_request() is failed. ret[%d]", ret); + } + if (app_control) { + app_control_destroy(app_control); } - - app_control_destroy(app_control); } static callui_result_e __create_main_content(callui_view_incoming_call_noti_h vd) diff --git a/src/callui-view-quickpanel.c b/src/callui-view-quickpanel.c index 6f26d5a..ab2e6c7 100755 --- a/src/callui-view-quickpanel.c +++ b/src/callui-view-quickpanel.c @@ -293,18 +293,21 @@ static void __main_layout_mouse_up_cb(void *data, Evas *evas, Evas_Object *obj, callui_app_data_t *ad = qp->ad; __hide_minicontrol(qp); - app_control_h request; - app_control_create(&request); - app_control_set_app_id(request, PACKAGE); - int err = app_control_send_launch_request(request, NULL, NULL); - if (err != APP_CONTROL_ERROR_NONE) { - err("app_control_send_launch_request() failed(0x%x)", err); - return; + app_control_h app_control = NULL; + int ret; + if ((ret = app_control_create(&app_control)) != APP_CONTROL_ERROR_NONE) { + err("app_control_create() is failed. ret[%d]", ret); + } else if ((ret = app_control_set_app_id(app_control, PACKAGE)) != APP_CONTROL_ERROR_NONE) { + err("app_control_set_app_id() is failed. ret[%d]", ret); + } else if ((ret = app_control_send_launch_request(app_control, NULL, NULL)) != APP_CONTROL_ERROR_NONE) { + err("app_control_send_launch_request() is failed. ret[%d]", ret); + } else { + ad->on_background = false; + _callui_lock_manager_start(ad->lock_handle); + } + if (app_control) { + app_control_destroy(app_control); } - - app_control_destroy(request); - ad->on_background = false; - _callui_lock_manager_start(ad->lock_handle); } static void __hide_minicontrol(callui_qp_mc_h qp) diff --git a/src/callui.c b/src/callui.c index 7b63829..caed088 100755 --- a/src/callui.c +++ b/src/callui.c @@ -41,7 +41,7 @@ static void __app_service(app_control_h app_control, void *data); static void __app_lang_changed_cb(app_event_info_h event_info, void *user_data); static bool __app_init(callui_app_data_t *ad); -static bool __app_deinit(callui_app_data_t *ad); +static void __app_deinit(callui_app_data_t *ad); static bool __create_main_gui_elem(callui_app_data_t *ad); static Evas_Object *__create_main_window(callui_app_data_t *ad); @@ -364,6 +364,7 @@ static bool __app_create(void *data) if (!res) { __app_deinit(data); } + return res; } @@ -447,7 +448,7 @@ static bool __create_main_gui_elem(callui_app_data_t *ad) return true; } -static bool __app_deinit(callui_app_data_t *ad) +static void __app_deinit(callui_app_data_t *ad) { debug_enter(); @@ -502,8 +503,6 @@ static bool __app_deinit(callui_app_data_t *ad) __bt_deinit(); debug_leave(); - - return false; } static void __app_terminate(void *data) @@ -517,18 +516,20 @@ static void __app_terminate(void *data) static void __app_pause(void *data) { - dbg(".."); + debug_enter(); _callui_common_unset_lock_state_changed_cb(); callui_app_data_t *ad = data; _callui_vm_pause(ad->view_manager); + + debug_leave(); } static void __app_resume(void *data) { - dbg(".."); + debug_enter(); callui_app_data_t *ad = data; @@ -540,6 +541,8 @@ static void __app_resume(void *data) } _callui_vm_resume(ad->view_manager); + + debug_leave(); } static void __app_service(app_control_h app_control, void *data) @@ -628,8 +631,8 @@ static Eina_Bool __hard_key_up_cb(void *data, int type, void *event) Ecore_Event_Key *ev = event; if (ev == NULL) { - err("ERROR!!! ========= Event is NULL!!!"); - return 0; + err("ERROR!!! Event is NULL!!!"); + return EINA_FALSE; } callui_view_type_e view_type = _callui_vm_get_cur_view_type(ad->view_manager); @@ -662,11 +665,11 @@ static Eina_Bool __hard_key_up_cb(void *data, int type, void *event) _callui_manager_end_call(ad->call_manager, incom->call_id, CALLUI_CALL_RELEASE_BY_CALL_HANDLE); } - } else if (view_type == CALLUI_VIEW_SINGLECALL - || view_type == CALLUI_VIEW_MULTICALL_CONF) { + } else if (view_type == CALLUI_VIEW_SINGLECALL || + view_type == CALLUI_VIEW_MULTICALL_CONF) { _callui_manager_end_call(ad->call_manager, 0, CALLUI_CALL_RELEASE_ALL); - } else if (view_type == CALLUI_VIEW_MULTICALL_SPLIT - || view_type == CALLUI_VIEW_MULTICALL_LIST) { + } else if (view_type == CALLUI_VIEW_MULTICALL_SPLIT || + view_type == CALLUI_VIEW_MULTICALL_LIST) { _callui_manager_end_call(ad->call_manager, 0, CALLUI_CALL_RELEASE_ALL_ACTIVE); } } else { @@ -762,7 +765,7 @@ static Eina_Bool __hard_key_down_cb(void *data, int type, void *event) Ecore_Event_Key *ev = event; if (ev == NULL) { - err("ERROR!!! ========= Event is NULL!!!"); + err("ERROR!!! Event is NULL!!!"); return EINA_FALSE; }