[Call UI] Fix application crash while trying to send reject message from Call Active... 86/101586/1
authorIgor Olshevskyi <i.olshevskyi@samsung.com>
Thu, 1 Dec 2016 12:57:22 +0000 (14:57 +0200)
committerIgor Olshevskyi <i.olshevskyi@samsung.com>
Thu, 1 Dec 2016 12:57:22 +0000 (14:57 +0200)
Change-Id: I746b39c8dfc666869466d60247b563f2f1daf044

edje_src/edc/callui-view-incoming-call-noti.edc
src/callui-view-incoming-call-noti.c

index 1054935..57df87a 100644 (file)
@@ -718,7 +718,6 @@ group { name: "elm/layout/callui/reject_msg_item_compose";
                )
                CU_PART_RECT( "ec.events",
                        mouse_events: 1;
-                       repeat_events: 1;
                        description {
                                state: "default" 0.0;
                                color: COLOR_BG_ALPHA;
index 81addc9..1fc3e04 100644 (file)
@@ -164,7 +164,7 @@ static void __reject_msg_animation_end_cb(callui_view_incoming_call_noti_h vd);
 static Eina_Bool __rm_animation_cb(void *data, double pos);
 static void __rm_scroller_anchor_move_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
 
-static Eina_Bool __on_rm_message_item_clicked(callui_app_data_t *ad, int index);
+static Eina_Bool __on_rm_message_item_clicked(Evas_Object *obj, int index);
 static Eina_Bool __on_rm_compose_item_clicked(callui_app_data_t *ad);
 static void __rm_message_item_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source);
 static void __rm_compose_item_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source);
@@ -567,8 +567,11 @@ static void __rm_scroller_anchor_move_cb(void *data, Evas *e, Evas_Object *obj,
        __rm_try_actualize(vd);
 }
 
-static Eina_Bool __on_rm_message_item_clicked(callui_app_data_t *ad, int index)
+static Eina_Bool __on_rm_message_item_clicked(Evas_Object *obj, int index)
 {
+       callui_app_data_t *ad = (callui_app_data_t *)evas_object_data_get(obj, CALLUI_REJ_MSG_GENLIST_DATA);
+       CALLUI_RETURN_VALUE_IF_FAIL(ad, EINA_FALSE);
+
        if (index != -1) {
                char *rm_markup_str = NULL;
                char *rm_str = _callui_common_get_reject_msg_by_index(index);
@@ -576,7 +579,6 @@ static Eina_Bool __on_rm_message_item_clicked(callui_app_data_t *ad, int index)
                        rm_markup_str = elm_entry_markup_to_utf8(rm_str); /*send utf8 text to MSG */
                        free(rm_str);
                }
-
                callui_result_e res = _callui_manager_reject_call(ad->call_manager);
                if (res != CALLUI_RESULT_OK) {
                        err("cm_reject_call() is failed. res[%d]", res);
@@ -605,11 +607,9 @@ static Eina_Bool __on_rm_compose_item_clicked(callui_app_data_t *ad)
 static void __rm_message_item_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
 {
        CALLUI_RETURN_IF_FAIL(data);
+       CALLUI_RETURN_IF_FAIL(obj);
 
-       callui_view_incoming_call_noti_h vd = (callui_view_incoming_call_noti_h)evas_object_data_get(obj, CALLUI_REJ_MSG_GENLIST_DATA);
-       CALLUI_RETURN_IF_FAIL(vd);
-
-       __on_rm_message_item_clicked(data, SAFE_C_CAST(int, data));
+       __on_rm_message_item_clicked(obj, SAFE_C_CAST(int, data));
 }
 
 static void __rm_compose_item_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
@@ -622,11 +622,9 @@ static void __rm_compose_item_clicked_cb(void *data, Evas_Object *obj, const cha
 static Eina_Bool __rm_message_item_access_action_cb(void *data, Evas_Object *obj, Elm_Access_Action_Info *action_info)
 {
        CALLUI_RETURN_VALUE_IF_FAIL(data, EINA_FALSE);
+       CALLUI_RETURN_VALUE_IF_FAIL(obj, EINA_FALSE);
 
-       callui_view_incoming_call_noti_h vd = (callui_view_incoming_call_noti_h)evas_object_data_get(obj, CALLUI_REJ_MSG_GENLIST_DATA);
-       CALLUI_RETURN_VALUE_IF_FAIL(vd, EINA_FALSE);
-
-       return __on_rm_message_item_clicked(data, SAFE_C_CAST(int, data));
+       return __on_rm_message_item_clicked(obj, SAFE_C_CAST(int, data));
 }
 
 static Eina_Bool __rm_compose_item_access_action_cb(void *data, Evas_Object *obj, Elm_Access_Action_Info *action_info)