From 9968832a14a8f66bf57bed724afcccd85aaf5d81 Mon Sep 17 00:00:00 2001 From: Igor Olshevskyi Date: Mon, 5 Dec 2016 19:20:28 +0200 Subject: [PATCH] TizenRefApp-7787 [Call UI] Implement End Call view logic according to UI with/without Screen Reader mode Change-Id: I89e6c2a73809deb058821622a89e059e5d015ba1 --- edje_src/edc/callui-view-caller-info.edc | 91 ++++++++++++--------------- edje_src/edc/callui-view-end-call.edc | 1 + edje_src/edc/callui-view-incoming-call.edc | 1 + edje_src/edc/callui-view-main-layout.edc | 3 +- src/callui-view-callend.c | 98 ++++++++++++++++++------------ src/callui-view-incoming-call-noti.c | 10 ++- src/callui-view-manager.c | 20 ++++-- src/callui.c | 5 -- 8 files changed, 127 insertions(+), 102 deletions(-) diff --git a/edje_src/edc/callui-view-caller-info.edc b/edje_src/edc/callui-view-caller-info.edc index 0f66c39..883d7b9 100644 --- a/edje_src/edc/callui-view-caller-info.edc +++ b/edje_src/edc/callui-view-caller-info.edc @@ -176,46 +176,6 @@ group{ name: "elm/button/base/callui/manage_calls"; } } -group { name: "elm/button/base/callui/add_contact"; - images { - image: "core_button_add.png" COMP; - } - parts { - CU_PART_IMAGE( "btn", - description { state: "default" 0.0; - fixed: 1 1; - min: CI_EC_ADD_CONT_BTN_SIZE; - max: CI_EC_ADD_CONT_BTN_SIZE; - image.normal: "core_button_add.png"; - color: COLOR_WHITE; - } - ) - CU_PART_RECT( "over", - mouse_events: 1; - description { state: "default" 0.0; - color: COLOR_BG_ALPHA; - rel1 { relative: 0.0 0.0; to: "btn"; } - rel2 { relative: 1.0 1.0; to: "btn"; } - } - ) - } - programs { - program { name: "mouse_clicked"; - signal: "mouse,clicked,1"; - source: "over"; - after: "touch_sound"; - after: "clicked_signal"; - } - program { name: "touch_sound"; - action: RUN_PLUGIN "touch_sound"; - } - program { name: "clicked_signal"; - in: 0.001 0.0; - action: SIGNAL_EMIT "elm,action,click" ""; - } - } -} - group{ name: "elm/layout/callui/caller_info"; images { @@ -420,6 +380,7 @@ group{ min: CI_MANAGE_CALLS_BTN_SIZE; max: CI_MANAGE_CALLS_BTN_SIZE; align: 1 1; + fixed: 1 1; } description { state: "hide" 0.0; inherit: "default" 0.0; @@ -493,22 +454,17 @@ group{ inherit: "default" 0.0; } ) - CU_PART_SPACER( "add_contact.base", + CU_PART_IMAGE( "ec_add_contact_img", description { state: "default" 0.0; + visible: 0; fixed: 1 1; align: 1.0 0.0; min: CI_EC_ADD_CONT_BTN_SIZE; max: CI_EC_ADD_CONT_BTN_SIZE; rel1 { relative: 0.0 1.0; to_x: "ec_add_cont.padding.left"; to_y: "ec_add_cont.padding.top"; } rel2 { relative: 0.0 1.0; to_x: "ec_add_cont.padding.left"; } - } - ) - CU_PART_SWALLOW( "swl.add_contact", - description { state: "default" 0.0; - visible: 0; - fixed: 1 1; - rel1 { relative: 0.0 0.0; to: "add_contact.base"; } - rel2 { relative: 1.0 1.0; to: "add_contact.base"; } + image.normal: "core_button_add.png"; + color: COLOR_WHITE; } description { state: "show" 0.0; inherit: "default" 0.0; @@ -518,6 +474,24 @@ group{ inherit: "default" 0.0; } ) + CU_PART_RECT( "ec_add_contact.click_area", + mouse_events: 1; + repeat_events: 1; + description { state: "default" 0.0; + visible: 0; + align: 0.5 0.0; + rel1 { relative: 0.0 0.0; to: "bg"; } + rel2 { relative: 1.0 1.0; to: "bg"; } + color: COLOR_BG_ALPHA; + } + description { state: "show" 0.0; + inherit: "default" 0.0; + visible: 1; + } + description { state: "hide" 0.0; + inherit: "default" 0.0; + } + ) // ACCESSIBILITY: CONFERENCE CALL @@ -727,11 +701,13 @@ group{ } program { name: "show_ec_add_cont_btn"; action: STATE_SET "show" 0.0; - target: "swl.add_contact"; + target: "ec_add_contact_img"; + target: "ec_add_contact.click_area"; } program { name: "hide_add_contact_btn"; action: STATE_SET "hide" 0.0; - target: "swl.add_contact"; + target: "ec_add_contact_img"; + target: "ec_add_contact.click_area"; } program { name: "try_show_ec_add_cont_btn"; script { @@ -747,6 +723,19 @@ group{ } } } + program { name: "contact_info_area_clicked"; + signal: "mouse,clicked,1"; + source: "ec_add_contact.click_area"; + after: "touch_sound"; + after: "contact_info_area_clicked_signal"; + } + program { name: "touch_sound"; + action: RUN_PLUGIN "touch_sound"; + } + program { name: "contact_info_area_clicked_signal"; + in: 0.001 0.0; + action: SIGNAL_EMIT "add_contact_area.clicked" "caller_info"; + } // MINIMIZE / MAXIMIZE START LOGIC diff --git a/edje_src/edc/callui-view-end-call.edc b/edje_src/edc/callui-view-end-call.edc index 23287cf..265d272 100644 --- a/edje_src/edc/callui-view-end-call.edc +++ b/edje_src/edc/callui-view-end-call.edc @@ -132,6 +132,7 @@ styles { type: TEXTBLOCK; \ scale: 1; \ description { state: "default" 0.0; \ + fixed: 0 1; \ rel1 { relative: 0.0 1.0; to: "text.padding.top"; } \ rel2 { relative: 1.0 1.0; to: "text.padding.top"; } \ min: 0 EC_REPLY_BTN_TXT_HEIGHT; \ diff --git a/edje_src/edc/callui-view-incoming-call.edc b/edje_src/edc/callui-view-incoming-call.edc index 924d52b..576a0f3 100644 --- a/edje_src/edc/callui-view-incoming-call.edc +++ b/edje_src/edc/callui-view-incoming-call.edc @@ -329,6 +329,7 @@ group { name: "elm/layout/callui/lock_reject_with_msg"; description { state: "default" 0.0; rel1 { relative: 0.0 0.0; to: "swl_msglist_bg"; } rel2 { relative: 1.0 1.0; to: "swl_msglist_bg"; } + fixed: 1 1; } } part { name: "arrow_bg"; diff --git a/edje_src/edc/callui-view-main-layout.edc b/edje_src/edc/callui-view-main-layout.edc index 50af1f2..4f0ba2e 100644 --- a/edje_src/edc/callui-view-main-layout.edc +++ b/edje_src/edc/callui-view-main-layout.edc @@ -34,6 +34,7 @@ group { name: "elm/layout/callui/app_main"; rel1{ relative: 0.0 0.0; to: "bg"; } rel2{ relative: 0.0 1.0; to: "bg"; } align: 0.0 0.5; + fixed: 1 1; } ) } @@ -167,7 +168,7 @@ group { name: "elm/layout/callui/view_main"; description { state: "show" 0.0; inherit: "default" 0.0; } - description { state: "show" 0.0; + description { state: "hide" 0.0; inherit: "default" 0.0; visible: 0; } diff --git a/src/callui-view-callend.c b/src/callui-view-callend.c index ae51745..5f34c21 100644 --- a/src/callui-view-callend.c +++ b/src/callui-view-callend.c @@ -38,8 +38,6 @@ #define CALLUI_CALLER_INFO_EC_PART_NAME "ec_contact_name" #define CALLUI_CALLER_INFO_EC_PART_NUMBER "ec_phone_number" -#define CALLUI_BTN_STYLE_ADD_CONTACT "callui/add_contact" - #define CALLUI_ENDING_TIMER_INTERVAL 2.0 #define CALLUI_BLINKING_TIMER_INTERVAL 0.5 #define CALLUI_BLINKING_MAX_COUNT 5 @@ -54,7 +52,6 @@ struct _callui_view_callend { Evas_Object *callback_btn; Evas_Object *message_btn; - Evas_Object *add_contact; Evas_Object *contact_popup; Evas_Object *reply_btns_box; @@ -67,6 +64,9 @@ struct _callui_view_callend { Ecore_Timer *ending_timer; char *time_string; int blink_count; + + /* Accessibility */ + Evas_Object *ao_add_contact; }; typedef struct _callui_view_callend _callui_view_callend_t; @@ -84,7 +84,9 @@ static char *__endcall_gl_item_text_cb(void *data, Evas_Object *obj, const char static void __create_contact_btn_click_cb(void *data, Evas_Object *obj, void *event_info); static void __update_contact_btn_click_cb(void *data, Evas_Object *obj, void *event_info); static void __popup_close_by_user_event_cb(void *data, Evas_Object *obj, void *event_info); -static void __add_contact_click_cb(void *data, Evas_Object *obj, void *event_info); +static void __add_contact_area_click_cb(void *data, Evas_Object *obj, const char *emission, const char *source); +static Eina_Bool __add_contact_area_activate_cb(void *data, Evas_Object *obj, Elm_Access_Action_Info *action_info); +static void __show_add_contact_popup(callui_view_callend_h vd, Evas_Object *obj); static Eina_Bool __ending_timer_expired_cb(void *data); static Eina_Bool __ending_timer_blink_cb(void *data); @@ -98,8 +100,6 @@ static Evas_Object *__create_call_back_btn(callui_view_callend_h vd); static Evas_Object *__create_message_btn(callui_view_callend_h vd); static Evas_Object *__create_reply_btns_divider(callui_view_callend_h vd); -static Evas_Object *__create_add_contact_btn(callui_view_callend_h vd); - static bool __set_caller_info(callui_view_callend_h vd, const callui_call_data_t *call_data); static void __set_caller_info_emergency_name(callui_view_callend_h vd); @@ -112,6 +112,7 @@ static void __show_caller_info_add_contact_btn(callui_view_callend_h vd); static void __bg_mouse_down_cb(void *data, Evas_Object *obj, const char *emission, const char *source); static void __minimize_anim_completed_cb(void *data, Evas_Object *obj, const char *emission, const char *source); static void __maximize_anim_completed_cb(void *data, Evas_Object *obj, const char *emission, const char *source); +static void __view_ly_back_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info); static void __run_minimize_animation(callui_view_callend_h vd); static void __run_maximize_animation(callui_view_callend_h vd); @@ -196,6 +197,7 @@ static callui_result_e __callui_view_callend_ondestroy(call_view_data_base_t *vi _callui_action_bar_hide(vd->base_view.ad->action_bar); edje_object_signal_callback_del_full(_EDJ(vd->base_view.contents), "mouse,down,*", "background", __bg_mouse_down_cb, vd); + eext_object_event_callback_del(vd->base_view.contents, EEXT_CALLBACK_BACK, __view_ly_back_btn_clicked_cb); DELETE_EVAS_OBJECT(vd->contact_popup); DELETE_EVAS_OBJECT(vd->base_view.contents); @@ -212,6 +214,11 @@ static void __update_action_bar_state(callui_app_data_t *ad) _callui_action_bar_set_access_possibility(ad->action_bar, false); } +static void __view_ly_back_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info) +{ + _callui_common_exit_app(); +} + static callui_result_e __create_main_content(callui_view_callend_h vd, Evas_Object *parent) { vd->base_view.contents = _callui_create_layout(parent, CALLUI_LY_STYLE_ENDCALL_VIEW); @@ -225,13 +232,15 @@ static callui_result_e __create_main_content(callui_view_callend_h vd, Evas_Obje elm_object_signal_callback_add(vd->base_view.contents, "maximize.anim.finished", "end_call_view", __maximize_anim_completed_cb, vd); + eext_object_event_callback_add(vd->base_view.contents, EEXT_CALLBACK_BACK, __view_ly_back_btn_clicked_cb, NULL); + vd->caller_info = _callui_create_layout(vd->base_view.contents, CALLUI_LY_STYLE_CALLER_INFO); CALLUI_RETURN_VALUE_IF_FAIL(vd->caller_info, CALLUI_RESULT_ALLOCATION_FAIL); elm_object_part_content_set(vd->base_view.contents, CALLUI_PART_SWL_CALLER_INFO, vd->caller_info); - vd->add_contact = __create_add_contact_btn(vd); - CALLUI_RETURN_VALUE_IF_FAIL(vd->add_contact, CALLUI_RESULT_ALLOCATION_FAIL); - elm_object_part_content_set(vd->caller_info, "swl.add_contact", vd->add_contact); + if (!_callui_dpm_is_need_enforce_change_password(vd->base_view.ad->dpm)) { + elm_object_signal_callback_add(vd->caller_info, "add_contact_area.clicked", "caller_info", __add_contact_area_click_cb, vd); + } Evas_Object *end_call_btn = _callui_create_end_call_button(vd->base_view.contents, NULL, NULL); CALLUI_RETURN_VALUE_IF_FAIL(end_call_btn, CALLUI_RESULT_ALLOCATION_FAIL); @@ -279,22 +288,6 @@ static Evas_Object *__create_message_btn(callui_view_callend_h vd) return eo; } -static Evas_Object *__create_add_contact_btn(callui_view_callend_h vd) -{ - Evas_Object *eo = elm_button_add(vd->base_view.contents); - CALLUI_RETURN_NULL_IF_FAIL(eo); - elm_object_style_set(eo, CALLUI_BTN_STYLE_ADD_CONTACT); - - if (!_callui_dpm_is_need_enforce_change_password(vd->base_view.ad->dpm)) { - evas_object_smart_callback_add(eo, "clicked", __add_contact_click_cb, vd); - } - - elm_atspi_accessible_translation_domain_set(eo, CALLUI_TEXT_DOMAIN); - elm_atspi_accessible_name_set(eo, "IDS_COM_OPT_ADD_TO_CONTACTS"); - - return eo; -} - static void __set_caller_info_emergency_name(callui_view_callend_h vd) { elm_object_signal_emit(vd->caller_info, "1line", "caller_name"); @@ -624,12 +617,8 @@ static void __popup_close_by_user_event_cb(void *data, Evas_Object *obj, void *e } } -static void __add_contact_click_cb(void *data, Evas_Object *obj, void *event_info) +static void __show_add_contact_popup(callui_view_callend_h vd, Evas_Object *obj) { - CALLUI_RETURN_IF_FAIL(data); - - callui_view_callend_h vd = data; - if (vd->ending_timer) { ecore_timer_freeze(vd->ending_timer); } else if (vd->blink_timer) { @@ -674,6 +663,27 @@ static void __add_contact_click_cb(void *data, Evas_Object *obj, void *event_inf evas_object_show(vd->contact_popup); } +static Eina_Bool __add_contact_area_activate_cb(void *data, Evas_Object *obj, Elm_Access_Action_Info *action_info) +{ + CALLUI_RETURN_VALUE_IF_FAIL(data, EINA_FALSE); + + if (action_info->action_type == ELM_ACCESS_ACTION_ACTIVATE) { + callui_view_callend_h vd = (callui_view_callend_h)data; + __show_add_contact_popup(vd, vd->base_view.contents); + return EINA_TRUE; + } + return EINA_FALSE; +} + +static void __add_contact_area_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; + + __show_add_contact_popup(vd, obj); +} + static void __msg_btn_click_cb(void *data, Evas_Object *obj, void *event_info) { CALLUI_RETURN_IF_FAIL(data); @@ -768,7 +778,7 @@ static void __unhighlight_accessible_objects(callui_view_callend_h vd) { elm_atspi_component_highlight_clear(vd->base_view.ao_call_status); elm_atspi_component_highlight_clear(vd->base_view.ao_caller_info); - elm_atspi_component_highlight_clear(vd->add_contact); + elm_atspi_component_highlight_clear(vd->ao_add_contact); if (vd->reply_btns_box) { elm_atspi_component_highlight_clear(vd->callback_btn); elm_atspi_component_highlight_clear(vd->message_btn); @@ -779,7 +789,7 @@ static void __prevent_highlight_accessible_objects(callui_view_callend_h vd) { elm_atspi_accessible_can_highlight_set(vd->base_view.ao_call_status, EINA_FALSE); elm_atspi_accessible_can_highlight_set(vd->base_view.ao_caller_info, EINA_FALSE); - elm_atspi_accessible_can_highlight_set(vd->add_contact, EINA_FALSE); + elm_atspi_accessible_can_highlight_set(vd->ao_add_contact, EINA_FALSE); if (vd->reply_btns_box) { elm_atspi_accessible_can_highlight_set(vd->callback_btn, EINA_FALSE); elm_atspi_accessible_can_highlight_set(vd->message_btn, EINA_FALSE); @@ -803,6 +813,16 @@ static callui_result_e __create_accessible_objects(callui_view_callend_h vd) elm_atspi_accessible_reading_info_type_set(vd->base_view.ao_caller_info, ELM_ACCESSIBLE_READING_INFO_TYPE_NAME); elm_atspi_accessible_name_set(vd->base_view.ao_caller_info, vd->ao_caller_info_buff); + vd->ao_add_contact = _callui_au_register_accessible_object(vd->caller_info, vd->caller_info, "ec_add_contact_img"); + CALLUI_RETURN_VALUE_IF_FAIL(vd->ao_add_contact, CALLUI_RESULT_FAIL); + elm_atspi_accessible_translation_domain_set(vd->ao_add_contact, CALLUI_TEXT_DOMAIN); + elm_atspi_accessible_role_set(vd->ao_add_contact, ELM_ATSPI_ROLE_PUSH_BUTTON); + elm_atspi_accessible_reading_info_type_set(vd->ao_add_contact, ELM_ACCESSIBLE_READING_INFO_TYPE_NAME); + elm_atspi_accessible_name_set(vd->ao_add_contact, "IDS_COM_OPT_ADD_TO_CONTACTS"); + if (!_callui_dpm_is_need_enforce_change_password(vd->base_view.ad->dpm)) { + elm_access_action_cb_set(vd->ao_add_contact, ELM_ACCESS_ACTION_ACTIVATE, __add_contact_area_activate_cb, vd); + } + return CALLUI_RESULT_OK; } @@ -814,6 +834,8 @@ static void __destroy_accessible_objects(callui_view_callend_h vd) DELETE_EVAS_OBJECT(vd->base_view.ao_call_status); _callui_au_unregister_accessible_object(vd->base_view.ao_caller_info); DELETE_EVAS_OBJECT(vd->base_view.ao_caller_info); + _callui_au_unregister_accessible_object(vd->ao_add_contact); + DELETE_EVAS_OBJECT(vd->base_view.ao_caller_info); } static void __register_accessibility_rout(callui_view_callend_h vd) @@ -824,11 +846,11 @@ static void __register_accessibility_rout(callui_view_callend_h vd) res = _callui_au_append_symmetric_relationship(vd->base_view.ao_call_status, vd->base_view.ao_caller_info); CALLUI_RETURN_IF_FAIL(res == CALLUI_RESULT_OK); - res = _callui_au_append_symmetric_relationship(vd->base_view.ao_caller_info, vd->add_contact); + res = _callui_au_append_symmetric_relationship(vd->base_view.ao_caller_info, vd->ao_add_contact); CALLUI_RETURN_IF_FAIL(res == CALLUI_RESULT_OK); if (vd->reply_btns_box) { - res = _callui_au_append_symmetric_relationship(vd->add_contact, vd->callback_btn); + res = _callui_au_append_symmetric_relationship(vd->ao_add_contact, vd->callback_btn); CALLUI_RETURN_IF_FAIL(res == CALLUI_RESULT_OK); res = _callui_au_append_symmetric_relationship(vd->callback_btn, vd->message_btn); @@ -837,7 +859,7 @@ static void __register_accessibility_rout(callui_view_callend_h vd) res = _callui_au_append_relationship_end_point(vd->message_btn); CALLUI_RETURN_IF_FAIL(res == CALLUI_RESULT_OK); } else { - res = _callui_au_append_relationship_end_point(vd->add_contact); + res = _callui_au_append_relationship_end_point(vd->ao_add_contact); CALLUI_RETURN_IF_FAIL(res == CALLUI_RESULT_OK); } } @@ -846,13 +868,13 @@ static void __unregister_accessibility_rout(callui_view_callend_h vd) { _callui_au_remove_symmetric_relationship(vd->base_view.ao_first, vd->base_view.ao_call_status); _callui_au_remove_symmetric_relationship(vd->base_view.ao_call_status, vd->base_view.ao_caller_info); - _callui_au_remove_symmetric_relationship(vd->base_view.ao_caller_info, vd->add_contact); + _callui_au_remove_symmetric_relationship(vd->base_view.ao_caller_info, vd->ao_add_contact); if (vd->reply_btns_box) { - _callui_au_remove_symmetric_relationship(vd->add_contact, vd->callback_btn); + _callui_au_remove_symmetric_relationship(vd->ao_add_contact, vd->callback_btn); _callui_au_remove_symmetric_relationship(vd->callback_btn, vd->message_btn); _callui_au_remove_relationship_end_point(vd->message_btn); } else { - _callui_au_remove_relationship_end_point(vd->add_contact); + _callui_au_remove_relationship_end_point(vd->ao_add_contact); } } diff --git a/src/callui-view-incoming-call-noti.c b/src/callui-view-incoming-call-noti.c index 1fc3e04..bc9aa81 100644 --- a/src/callui-view-incoming-call-noti.c +++ b/src/callui-view-incoming-call-noti.c @@ -624,14 +624,20 @@ static Eina_Bool __rm_message_item_access_action_cb(void *data, Evas_Object *obj CALLUI_RETURN_VALUE_IF_FAIL(data, EINA_FALSE); CALLUI_RETURN_VALUE_IF_FAIL(obj, EINA_FALSE); - return __on_rm_message_item_clicked(obj, SAFE_C_CAST(int, data)); + if (action_info->action_type == ELM_ACCESS_ACTION_ACTIVATE) { + return __on_rm_message_item_clicked(obj, SAFE_C_CAST(int, data)); + } + return EINA_FALSE; } static Eina_Bool __rm_compose_item_access_action_cb(void *data, Evas_Object *obj, Elm_Access_Action_Info *action_info) { CALLUI_RETURN_VALUE_IF_FAIL(data, EINA_FALSE); - return __on_rm_compose_item_clicked(data); + if (action_info->action_type == ELM_ACCESS_ACTION_ACTIVATE) { + return __on_rm_compose_item_clicked(data); + } + return EINA_FALSE; } static callui_result_e __rm_create_message_items(callui_view_incoming_call_noti_h vd, Evas_Object *box, int *insert_item_count) diff --git a/src/callui-view-manager.c b/src/callui-view-manager.c index fce20b2..a8925b1 100644 --- a/src/callui-view-manager.c +++ b/src/callui-view-manager.c @@ -83,6 +83,7 @@ static void __delete_action_popup(callui_vm_h vm); static void __delete_more_menu_popup(callui_vm_h vm) { if (vm->more_ctxpopup) { + dbg("Delete more menu ctxpopup"); evas_object_event_callback_del_full(vm->more_ctxpopup, EVAS_CALLBACK_DEL, __more_menu_popup_delete_cb, vm); DELETE_EVAS_OBJECT(vm->more_ctxpopup); } @@ -93,12 +94,17 @@ static void __more_menu_popup_delete_cb(void *data, Evas *e, Evas_Object *obj, v CALLUI_RETURN_IF_FAIL(data); callui_vm_h vm = (callui_vm_h)data; - evas_object_event_callback_del_full(vm->more_ctxpopup, EVAS_CALLBACK_DEL, __more_menu_popup_delete_cb, vm); - vm->more_ctxpopup = NULL; + if (vm->more_ctxpopup) { + dbg("Delete more menu ctxpopup"); + evas_object_event_callback_del_full(vm->more_ctxpopup, EVAS_CALLBACK_DEL, __more_menu_popup_delete_cb, vm); + vm->more_ctxpopup = NULL; + } } static void __more_btn_click_cb(void *data, Evas_Object *obj, void *event_info) { + debug_enter(); + CALLUI_RETURN_IF_FAIL(data); callui_vm_h vm = (callui_vm_h)data; @@ -739,14 +745,18 @@ static void __action_popup_del_cb(void *data, Evas *e, Evas_Object *obj, void *e CALLUI_RETURN_IF_FAIL(data); callui_vm_h vm = (callui_vm_h)data; - evas_object_event_callback_del_full(vm->action_popup, EVAS_CALLBACK_DEL, __action_popup_del_cb, vm); - vm->action_popup = NULL; - vm->action_popup_type = CALLUI_ACTION_POPUP_UNDEFINED; + if (vm->action_popup) { + dbg("Delete action popup [%d]", vm->action_popup_type); + evas_object_event_callback_del_full(vm->action_popup, EVAS_CALLBACK_DEL, __action_popup_del_cb, vm); + vm->action_popup = NULL; + vm->action_popup_type = CALLUI_ACTION_POPUP_UNDEFINED; + } } static void __delete_action_popup(callui_vm_h vm) { if (vm->action_popup) { + dbg("Delete action popup [%d]", vm->action_popup_type); evas_object_event_callback_del_full(vm->action_popup, EVAS_CALLBACK_DEL, __action_popup_del_cb, vm); DELETE_EVAS_OBJECT(vm->action_popup); vm->action_popup_type = CALLUI_ACTION_POPUP_UNDEFINED; diff --git a/src/callui.c b/src/callui.c index 684eb62..ea98825 100755 --- a/src/callui.c +++ b/src/callui.c @@ -30,7 +30,6 @@ #include "callui-sound-manager.h" #include "callui-state-provider.h" -#define CALLUI_KEY_BACK "XF86Back" #define CALLUI_KEY_MEDIA "XF86AudioMedia" #define CALLUI_KEY_VOLUMEUP "XF86AudioRaiseVolume" #define CALLUI_KEY_VOLUMEDOWN "XF86AudioLowerVolume" @@ -914,10 +913,6 @@ static Eina_Bool __hard_key_up_cb(void *data, int type, void *event) } else if (!strcmp(ev->keyname, CALLUI_KEY_MEDIA)) { dbg("KEY_MEDIA"); __process_media_key_up(ad); - } else if (!strcmp(ev->keyname, CALLUI_KEY_BACK)) { - if (_callui_vm_get_cur_view_type(ad->view_manager) == CALLUI_VIEW_ENDCALL) { - _callui_common_exit_app(); - } } return ECORE_CALLBACK_DONE; -- 2.7.4