Fix N_SE-21691, disable more button of composer in case of sms
[apps/core/preloaded/message-app.git] / composer / src / ui-composer / msg-ui-composer-main.c
index ce535d7..1e9626d 100755 (executable)
@@ -5,7 +5,7 @@
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- *    http://www.tizenopensource.org/license
+ *    http://floralicense.org/license
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,6 +16,9 @@
 
 /* includes*/
 #include <Ecore_X.h>
+#include <tapi_common.h>
+#include <TapiUtility.h>
+#include <utilX.h>
 
 #include "msg-ui-composer-main.h"
 #include "msg-ui-composer-recipient.h"
@@ -28,6 +31,7 @@
 #include "msg-ui-composer-common.h"
 #include "msg-ui-composer-external.h"
 #include "msg-ui-composer-bubble.h"
+#include "msg-ui-composer-main.h"      /*for page duration, it should be removed if more option concept is changed*/
 
 #include "msg-ui-common-utility.h"
 
@@ -88,33 +92,31 @@ static void __msgc_vconf_changed_cb(keynode_t *key, void *data)
        char *key_name = NULL;
 
        key_name = vconf_keynode_get_name(key);
-
        if (!key_name) {
                D_EMSG("key_name is NULL");
                return;
        }
 
        if (!strcmp(key_name, VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE)) {
-/*
- * 0 : giant : 106
- * 1 : huge : 81
- * 2 : large : 64
- * 3 : normal (default) : 44
- * 4 : small : 36
-*/
                index = vconf_keynode_get_int(key);
-               font_size = msg_ui_composer_get_font_size(index, (int)COMPOSER_SYSTEM_FONT_SIZE);
+               font_size = msg_common_get_font_size_from_index(index);
                converted_size = (MSGC_BODY_FONT_SIZE * font_size) / MSG_APP_FONT_SIZE_NORMAL;
 
-               cd->font_size.last_updated_setting = COMPOSER_SYSTEM_FONT_SIZE;
-               cd->font_size.sys_font_size = converted_size;
+               cd->font_size = converted_size;
+
+               /* sync current font size as accessibility font index */
+               if (msg_common_set_font_size(index) == FALSE)
+                       D_EMSG("msg_common_set_font_size(index = %d) is failed !!", index);
+
+               /* sync msg accessibility font size with accessibility font index */
+               if (msg_common_set_access_font_size(index) == FALSE)
+                       D_EMSG("vconf_set_int(VCONFKEY_MSG_APP_ACCESS_FONT_SIZE) is failed !!, [%d]", index);
        } else if (!strcmp(key_name, VCONFKEY_MSG_APP_FONT_SIZE)) {
                index = vconf_keynode_get_int(key);
-               font_size = msg_ui_composer_get_font_size(index, (int)COMPOSER_MSG_FONT_SIZE);
+               font_size = msg_common_get_font_size_from_index(index);
                converted_size = (MSGC_BODY_FONT_SIZE * font_size) / MSG_APP_FONT_SIZE_NORMAL;
 
-               cd->font_size.last_updated_setting = COMPOSER_MSG_FONT_SIZE;
-               cd->font_size.msg_font_size = converted_size;
+               cd->font_size = converted_size;
        } else {
                D_EMSG("key did not match.");
        }
@@ -131,34 +133,52 @@ static void __msgc_init_font_size(MSG_COMPOSER_VIEW_DATA_S *cd)
        D_MSG_RETM_IF(cd == NULL, "Composer Data is NULL");
 
        int index = 0;
+       int access_font_index = 0;
+       int msg_access_font_index = 0;
        int font_size = 0;
        int converted_size = 0;
 
-       if (msg_common_get_font_size(&index, &font_size) != TRUE) {
-               D_EMSG("msg_common_get_font_size() is failed !!");
+       /* get msg accessibility font index */
+       if (msg_common_get_access_font_size(&msg_access_font_index) == FALSE) {
+               D_EMSG("msg_common_get_access_font_size is failed !!");
+               msg_access_font_index = MSG_APP_FONT_SIZE_INDEX_NORMAL; /* 1 */
+       }
+
+       /* get accessibility font index */
+       if (vconf_get_int(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, &access_font_index) < 0) {
+               D_EMSG("vconf_get_int(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE) is failed !!");
+               access_font_index = MSG_SYS_FONT_SIZE_INDEX_NORMAL;     /* 1 */
+       }
+
+       if (msg_common_get_font_size(&index) == FALSE) {
+               D_EMSG("msg_common_get_font_size() is failed");
+               cd->font_size = MSGC_BODY_FONT_SIZE;
+               return;
        } else {
-               D_MSG("selected index = %d", index);
+               D_MSG("selected font_size index = %d", index);
        }
 
-       if (index == MSG_APP_FONT_SIZE_INDEX_SYSTEM_FONT) {
-               if (vconf_get_int(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, &index) < 0) {
-                       D_EMSG("vconf_get_int(system font_size) is failed !!");
-                       index = MSG_SYS_FONT_SIZE_INDEX_NORMAL;
-               }
+       D_MSG("VCONFKEY_MSG_APP_ACCESS_FONT_SIZE = %d", msg_access_font_index);
+       D_MSG("VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE = %d", access_font_index);
 
-               font_size = msg_ui_composer_get_font_size(index, (int)COMPOSER_SYSTEM_FONT_SIZE);
-               converted_size = (MSGC_BODY_FONT_SIZE * font_size) / MSG_APP_FONT_SIZE_NORMAL;
+       if (msg_access_font_index != access_font_index) {
+               font_size = msg_common_get_font_size_from_index(access_font_index);
 
-               cd->font_size.last_updated_setting = COMPOSER_SYSTEM_FONT_SIZE;
-               cd->font_size.sys_font_size = converted_size;
+               /* sync current font size as accessibility font index */
+               if (msg_common_set_font_size(access_font_index) == FALSE)
+                       D_EMSG("msg_common_set_font_size(index = %d) is failed !!", access_font_index);
 
+               /* sync msg accessibility font size with accessibility font index */
+               if (msg_common_set_access_font_size(access_font_index) == FALSE)
+                       D_EMSG("vconf_set_int(VCONFKEY_MSG_APP_ACCESS_FONT_SIZE) is failed !!, [%d]", access_font_index);
        } else {
-               converted_size = (MSGC_BODY_FONT_SIZE * font_size) / MSG_APP_FONT_SIZE_NORMAL;
-
-               cd->font_size.last_updated_setting = COMPOSER_MSG_FONT_SIZE;
-               cd->font_size.msg_font_size = converted_size;
+               font_size = msg_common_get_font_size_from_index(index);
        }
-       D_MSG("font size = %d", converted_size);
+
+       converted_size = (MSGC_BODY_FONT_SIZE * font_size) / MSG_APP_FONT_SIZE_NORMAL;
+
+       cd->font_size = converted_size;
+       D_MSG("font size = %d, converted_size = %d", font_size, converted_size);
 
        D_LEAVE;
 }
@@ -221,6 +241,7 @@ static void __msgc_ui_parse_mmsto_uri(MSG_COMPOSER_VIEW_DATA_S *cd, service_h sv
        D_ENTER;
        D_MSG_RETM_IF(cd == NULL, "Composer Data is NULL");
        D_MSG_RETM_IF(svc_handle == NULL, "svc_handle is NULL");
+       D_MSG_RETM_IF(uri == NULL, "uri is NULL");
 
        char *content = NULL;
        char *recipient = NULL;
@@ -252,13 +273,11 @@ static void __msgc_ui_parse_mmsto_uri(MSG_COMPOSER_VIEW_DATA_S *cd, service_h sv
                }
        }
 
-       if ((service_get_extra_data(svc_handle, SERVICE_DATA_TEXT, &body_text) == SERVICE_ERROR_NONE) && body_text) {
+       if ((service_get_extra_data(svc_handle, SERVICE_DATA_TEXT, &body_text) == SERVICE_ERROR_NONE) && body_text)
                msg_ui_composer_body_set_loaded_text(cd, (const char *)body_text, 0);
-       }
 
-       if ((service_get_extra_data(svc_handle, SERVICE_DATA_SUBJECT, &subject) == SERVICE_ERROR_NONE) && subject) {
+       if ((service_get_extra_data(svc_handle, SERVICE_DATA_SUBJECT, &subject) == SERVICE_ERROR_NONE) && subject)
                msg_ui_composer_subject_set_loaded_data(cd, (const char *)subject);
-       }
 
        if ((service_get_extra_data(svc_handle, MSG_BUNDLE_KEY_ATTACHFILE, &attachment) == SERVICE_ERROR_NONE) && attachment) {
                cd->attachlist = make_tokenize_list((const char *)attachment, COMPOSER_BUNDLE_ATTACH_TOKEN);
@@ -273,6 +292,7 @@ static void __msgc_ui_parse_file_uri(MSG_COMPOSER_VIEW_DATA_S *cd, service_h svc
 {
        D_ENTER;
        D_MSG_RETM_IF(cd == NULL, "Composer Data is NULL");
+       D_MSG_RETM_IF(uri == NULL, "uri is NULL");
 
        char *content = NULL;
        char attachment[DEF_IMG_PATH_LEN + 1] = {0, };
@@ -316,6 +336,8 @@ static void __msg_ui_parse_sms_uri(MSG_COMPOSER_VIEW_DATA_S *cd, service_h svc_h
 {
        D_ENTER;
        D_MSG_RETM_IF(cd == NULL, "Composer Data is NULL");
+       D_MSG_RETM_IF(svc_handle == NULL, "svc_handle is NULL");
+       D_MSG_RETM_IF(uri == NULL, "uri is NULL");
 
        char *content = NULL;
        char *recipient = NULL;
@@ -336,14 +358,12 @@ static void __msg_ui_parse_sms_uri(MSG_COMPOSER_VIEW_DATA_S *cd, service_h svc_h
                }
                g_free(scheme);
        } else {
-               if ((service_get_extra_data(svc_handle, SERVICE_DATA_TO, &recipient) == SERVICE_ERROR_NONE) && recipient) {
+               if ((service_get_extra_data(svc_handle, SERVICE_DATA_TO, &recipient) == SERVICE_ERROR_NONE) && recipient)
                        __msgc_parse_recipient_list(cd, (const char *)recipient);
-               }
        }
 
-       if ((service_get_extra_data(svc_handle, SERVICE_DATA_TEXT, &body_text) == SERVICE_ERROR_NONE) && body_text) {
+       if ((service_get_extra_data(svc_handle, SERVICE_DATA_TEXT, &body_text) == SERVICE_ERROR_NONE) && body_text)
                msg_ui_composer_body_set_loaded_text(cd, (const char *)body_text, 0);
-       }
 
        D_LEAVE;
 }
@@ -370,22 +390,23 @@ static void __msgc_get_service_app_svc_op(MSG_COMPOSER_VIEW_DATA_S *cd, service_
                                 __msgc_ui_parse_mmsto_uri(cd, svc_handle, (const char *)uri);
                        } else if (g_str_has_prefix(uri, MSG_BUNDLE_VALUE_FILE_URI)) { /* URI : file */
                                 __msgc_ui_parse_file_uri(cd, svc_handle, (const char *)uri);
+                       } else if (g_str_has_prefix(uri, "/")) {
+                               cd->attachlist = make_tokenize_list((const char *)uri, COMPOSER_BUNDLE_ATTACH_TOKEN);
+                               if (cd->attachlist)
+                                       msg_ui_composer_body_items_add(cd);
                        } else {
-                               D_MSG("Not supported mime type");
+                               D_EMSG("Not supported URI type");
                                return;
                        }
                } else {
-                       if ((service_get_extra_data(svc_handle, SERVICE_DATA_TO, &recipient) == SERVICE_ERROR_NONE) && recipient) {
+                       if ((service_get_extra_data(svc_handle, SERVICE_DATA_TO, &recipient) == SERVICE_ERROR_NONE) && recipient)
                                __msgc_parse_recipient_list(cd, (const char *)recipient);
-                       }
 
-                       if ((service_get_extra_data(svc_handle, SERVICE_DATA_TEXT, &body_text) == SERVICE_ERROR_NONE) && body_text) {
+                       if ((service_get_extra_data(svc_handle, SERVICE_DATA_TEXT, &body_text) == SERVICE_ERROR_NONE) && body_text)
                                msg_ui_composer_body_set_loaded_text(cd, (const char *)body_text, 0);
-                       }
 
-                       if ((service_get_extra_data(svc_handle, SERVICE_DATA_SUBJECT, &subject) == SERVICE_ERROR_NONE) && subject) {
+                       if ((service_get_extra_data(svc_handle, SERVICE_DATA_SUBJECT, &subject) == SERVICE_ERROR_NONE) && subject)
                                msg_ui_composer_subject_set_loaded_data(cd, (const char *)subject);
-                       }
 
                        if ((service_get_extra_data(svc_handle, MSG_BUNDLE_KEY_ATTACHFILE, &attachment) == SERVICE_ERROR_NONE) && attachment) {
                                cd->attachlist = make_tokenize_list((const char *)attachment, COMPOSER_BUNDLE_ATTACH_TOKEN);
@@ -401,17 +422,15 @@ static void __msgc_get_service_app_svc_op(MSG_COMPOSER_VIEW_DATA_S *cd, service_
                        if (g_str_has_prefix(uri, MSG_BUNDLE_VALUE_SMS_URI)) {  /* SMS URI : sms */
                                __msg_ui_parse_sms_uri(cd, svc_handle, (const char *)uri);
                        } else {
-                               D_MSG("Not supported mime type");
+                               D_EMSG("Not supported mime type");
                                return;
                        }
                } else {
-                       if ((service_get_extra_data(svc_handle, SERVICE_DATA_TO, &recipient) == SERVICE_ERROR_NONE) && recipient) {
+                       if ((service_get_extra_data(svc_handle, SERVICE_DATA_TO, &recipient) == SERVICE_ERROR_NONE) && recipient)
                                __msgc_parse_recipient_list(cd, (const char *)recipient);
-                       }
 
-                       if ((service_get_extra_data(svc_handle, SERVICE_DATA_TEXT, &body_text) == SERVICE_ERROR_NONE) && body_text) {
+                       if ((service_get_extra_data(svc_handle, SERVICE_DATA_TEXT, &body_text) == SERVICE_ERROR_NONE) && body_text)
                                msg_ui_composer_body_set_loaded_text(cd, (const char *)body_text, 0);
-                       }
                }
        } else {
                D_EMSG("Invalid operation type !!");
@@ -429,32 +448,37 @@ static void __msg_ui_composer_bundle_data_process(MSG_COMPOSER_VIEW_DATA_S *cd,
 
        char *bundle_txt = NULL;
 
-       service_get_extra_data(svc_handle, MSG_BUNDLE_KEY_FORWARD, &bundle_txt);
+       if (cd->isAppControl) { /* composer launching from appcontrol */
+               char *operation = NULL;
 
-       if (bundle_txt) {
-               int msg_id = atoi(bundle_txt);
-               msg_ui_composer_message_init();
-               msg_ui_composer_message_load_message(cd->msg_handle, msg_id);
-               msg_ui_composer_message_set_loaded_data(cd);
-               msg_ui_composer_message_destroy();
+               service_get_operation(svc_handle, &operation);
+               __msgc_get_service_app_svc_op(cd, svc_handle, operation);
        } else {
-               char *operation = NULL;
-               if (service_get_operation(svc_handle, &operation) == SERVICE_ERROR_NONE && operation) { /* composer launching via service */
-                       cd->isAppControl = true;
+               if (cd->composer_mode == MSG_COMPOSER_MODE_EDIT || cd->composer_mode == MSG_COMPOSER_MODE_FORWARD) {
+                       if ((service_get_extra_data(svc_handle, MSG_BUNDLE_KEY_MSG_ID, &bundle_txt) == SERVICE_ERROR_NONE) && bundle_txt) {
+                               bool set_recipient = false;
+                               int msg_id = atoi(bundle_txt);
 
-                       __msgc_get_service_app_svc_op(cd, svc_handle, operation);
+                               if (cd->composer_mode == MSG_COMPOSER_MODE_EDIT)
+                                       set_recipient = true;
 
-               } else {        /* internal ug mode */
-                       cd->isAppControl = false;
+                               msg_ui_composer_message_init();
+                               msg_ui_composer_message_load_message(cd->msg_handle, msg_id);
+                               if (msg_ui_composer_message_set_loaded_data(cd, set_recipient) != COMPOSER_RETURN_CREATION_WARINING_MODE_FAIL)
+                                       msg_ui_composer_message_destroy();
 
+                       } else {
+                               D_EMSG("there is no msgid");
+                       }
+               } else {
                        if ((service_get_extra_data(svc_handle, MSG_BUNDLE_KEY_TO, &bundle_txt) == SERVICE_ERROR_NONE) && bundle_txt) {
                                __msgc_parse_recipient_list(cd, bundle_txt);
                        } else {
                                if ((service_get_extra_data(svc_handle, MSG_BUNDLE_KEY_NUMBER_INDEX, &bundle_txt)== SERVICE_ERROR_NONE) && bundle_txt) {
-                                       char *recipient;
-                                       char *index;
-                                       char *save_p;
-                                       int idx;
+                                       char *recipient = NULL;
+                                       char *index  = NULL;
+                                       char *save_p = NULL;
+                                       int idx = 0;
 
                                        char *copy_string = MSG_STRDUP(bundle_txt);
                                        if (copy_string) {
@@ -545,7 +569,7 @@ static void  __msg_ui_composer_end_popup(MSG_COMPOSER_VIEW_DATA_S *cd)
 
        MSGC_EVAS_OBJECT_DEL(cd->popup_end);
 
-       Evas_Object *popup = msg_ui_composer_status_popup_show(cd, MSGC_STR_POP_DISCARD_Q, 0);
+       Evas_Object *popup = msg_ui_composer_status_popup_show(cd->main_window, cd, MSGC_STR_POP_DISCARD_Q, 0);
        Evas_Object *btn1 = elm_button_add(popup);
        elm_object_style_set(btn1, "popup_button/default");
        elm_object_text_set(btn1, MSGC_STR_BUTTON_OK);
@@ -586,29 +610,20 @@ static void __naviframe_back_btn_clicked_cb(void *data, Evas_Object *obj, void *
                if (edit_state == COMPOSER_EDIT_RECIPIENT || edit_state == COMPOSER_EDIT_BODY) {
                        __msg_ui_composer_end_popup(cd);
                        return;
-               } else if (edit_state == COMPOSER_EDIT_RECIPIENT_AND_BODY) {
-                       /* auto saving */
-                       msg_ui_composer_message_init();
-
-                       if (msg_ui_composer_get_message_data(cd) == COMPOSER_RETURN_SUCCESS) {
-                               msg_ui_composer_save_message(cd->msg_handle);
-
-                               /* show saved ticker popup */
-                               msg_ui_composer_common_tickernoti(cd, COMPOSER_TICKERNOTI_AUTO_SAVED);
-                       }
-
-                       msg_ui_composer_message_destroy();
                }
        } else if (cd->msg_ug_mode == MSG_UG_MODE_BUBBLE_COMPOSER) {
                if (edit_state == COMPOSER_EDIT_RECIPIENT) {
 
                        PMSG_BUBBLE_DATA bubble_data = cd->bubble_data;
 
+                       if (bubble_data->title_menu_opened)
+                               msg_ui_bubble_close_title_menu_genlist(bubble_data);
+
                        if (bubble_data->bubble_count == 0) {
                                int err = MSG_SUCCESS;
 
                                if (bubble_data->isDraft == true)
-                                       err = msg_delete_thread_message_list(bubble_data->msgHandle, bubble_data->threadId);
+                                       err = msg_delete_thread_message_list(bubble_data->msgHandle, bubble_data->threadId, false);
 
                                if (err == MSG_SUCCESS) {
                                        service_h svc_handle;
@@ -627,38 +642,8 @@ static void __naviframe_back_btn_clicked_cb(void *data, Evas_Object *obj, void *
                                } else {
                                        D_MSG("msg_delete_thread_message_list failed");
                                }
-                       } else {
-                               /* delete draft message */
-                               msg_struct_list_s msg_list;
-
-                               if (msg_get_message_list(cd->msg_handle, MSG_DRAFT_ID, bubble_data->threadId, 0, 0, &msg_list) == MSG_SUCCESS) {
-                                       int i = 0;
-                                       int msgid = 0;
-
-                                       for (i= 0; i < msg_list.nCount; i++) {
-                                               msg_get_int_value(msg_list.msg_struct_info[i], MSG_MESSAGE_ID_INT, &msgid);
-                                               D_MSG("draft msg_id is %d", msgid);
-                                               if (msg_delete_message(cd->msg_handle, msgid) != COMPOSER_RETURN_SUCCESS)
-                                                       D_EMSG("msg_ui_comp_core_delete_message is failed = %d", msgid);
-                                       }
-                               }
-                               msg_release_list_struct(&msg_list);
                        }
-               } else if (edit_state == COMPOSER_EDIT_RECIPIENT_AND_BODY) {
-                       /* auto saving */
-                       msg_ui_composer_message_init();
-
-                       if (msg_ui_composer_get_message_data(cd) == COMPOSER_RETURN_SUCCESS) {
-                               msg_ui_composer_save_message(cd->msg_handle);
-                               /* show saved ticker popup */
-                               msg_ui_composer_common_tickernoti(cd, COMPOSER_TICKERNOTI_AUTO_SAVED);
-                       }
-
-                       msg_ui_composer_message_destroy();
                }
-               /* clear recipient_list of bubble composer */
-               msg_ui_composer_recipient_clear_recipient_list(cd);
-
        }
 
        ug_destroy_me(cd->ug);
@@ -683,12 +668,13 @@ static void __preview_btn_clicked_cb(void *data, Evas_Object *obj, void *event_i
        if (msgInfo)
                msg_ui_composer_external_call(cd, COMPOSER_EXT_TYPE_MSGVIEWER, msgInfo);
 
-       msg_release_struct(&msgInfo);
        msg_ui_composer_message_destroy();
 
-       elm_object_item_signal_emit(cd->navi_it, "elm,state,optionheader,close", "");
-       elm_object_signal_emit(cd->navi_title_layout, "elm,state,more,hide", "");
-       cd->navi_optionheader_opened = EINA_FALSE;
+       if (cd->ctx_popup) {
+               evas_object_del(cd->ctx_popup);
+               cd->ctx_popup = NULL;
+       }
+
        D_LEAVE;
 }
 
@@ -701,173 +687,117 @@ static void __pageduration_btn_clicked_cb(void *data, Evas_Object *obj, void *ev
 
        msg_ui_composer_pageduration_popup_create(cd);
 
+       if (cd->ctx_popup) {
+               evas_object_del(cd->ctx_popup);
+               cd->ctx_popup = NULL;
+       }
+
        D_LEAVE;
 }
 
-static Evas_Object *__toolbar_btn_create(Evas_Object *parent, char *text, char *style)
+static void __msg_ui_composer_ctxpopup_dismissed_cb(void *data, Evas_Object *obj, void *event_info)
 {
-       D_ENTER;
-       D_MSG_RETVM_IF(parent == NULL, NULL, "parent == NULL");
-
-       Evas_Object *button = elm_button_add(parent);
-
-       if (style)
-               elm_object_style_set(button, style);
-       else
-               elm_object_style_set(button, "naviframe_control/default");
-
-       evas_object_size_hint_weight_set(button, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       evas_object_size_hint_align_set(button, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       MSG_UI_ENTER();
+       MSG_COMPOSER_VIEW_DATA_S *cd = data;
 
-       if (text) {
-               char *popup_msg = elm_entry_utf8_to_markup(text);
-               if (popup_msg) {
-                       elm_object_text_set(button, popup_msg);
-                       g_free(popup_msg);
-               } else {
-                       elm_object_text_set(button, text);
-               }
+       if (cd->ctx_popup) {
+               evas_object_del(cd->ctx_popup);
+               cd->ctx_popup = NULL;
        }
 
-       evas_object_show(button);
-
-       D_LEAVE;
-       return button;
+       MSG_UI_LEAVE();
 }
 
-static Evas_Object *__toolbar_top_create(MSG_COMPOSER_VIEW_DATA_S *cd)
+static void msg_composer_naviframe_more_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info)
 {
-       D_ENTER;
+       MSG_UI_ENTER();
+       MSG_UI_RET_IF(MSG_UI_LEVEL_ERR, !data || !obj);
 
-       Evas_Object *toolbar = NULL;
-       int isBubble = 0;
-       toolbar = elm_toolbar_add(cd->navi_bar);
-       elm_toolbar_shrink_mode_set(toolbar, ELM_TOOLBAR_SHRINK_EXPAND);
+       MSG_COMPOSER_VIEW_DATA_S *cd = data;
+       PMSG_BUBBLE_DATA bubble_data = cd->bubble_data;
+       Evas_Object *ctx_popup = NULL;
 
-       if (!toolbar) {
-               D_EMSG("toolbar is NULL");
-               return NULL;
+       if (cd->popup_end) {
+               evas_object_del(cd->popup_end);
+               cd->popup_end = NULL;
        }
 
-       elm_object_style_set(toolbar, "naviframe");
-
-       if (cd->msg_ug_mode == MSG_UG_MODE_BUBBLE_COMPOSER) {
-               /* create delete button */
-               Evas_Object *delete_button = __toolbar_btn_create(toolbar, dgettext("sys_string", "IDS_COM_SK_DELETE"), NULL);
-               evas_object_smart_callback_add(delete_button, "clicked", msg_ui_bubble_option_header_delete_clicked_cb, cd);
-
-               cd->toolbar_btn[CONTROLBAR_ITEM_1] = delete_button;
-               cd->toolbar_item_top[CONTROLBAR_ITEM_1] = elm_toolbar_item_append(toolbar, NULL, NULL, NULL, cd);
-               elm_object_item_part_content_set(cd->toolbar_item_top[CONTROLBAR_ITEM_1], "object", delete_button);
+       if (bubble_data) {
+               if (bubble_data->popup) {
+                       evas_object_del(bubble_data->popup);
+                       bubble_data->popup = NULL;
+               }
 
-               isBubble = 1;
+               if (bubble_data->title_menu_opened)
+                       msg_ui_bubble_close_title_menu_genlist(bubble_data);
        }
 
-       /* create preview button */
-       Evas_Object *preview_button = __toolbar_btn_create(toolbar, MSGC_STR_PREVIEW, NULL);
-       evas_object_smart_callback_add(preview_button, "clicked", __preview_btn_clicked_cb, cd);
-       cd->toolbar_btn[CONTROLBAR_ITEM_1+isBubble] = preview_button;
-       cd->toolbar_item_top[CONTROLBAR_ITEM_1+isBubble] = elm_toolbar_item_append(toolbar, NULL, NULL, NULL, cd);
-       elm_object_item_part_content_set(cd->toolbar_item_top[CONTROLBAR_ITEM_1+isBubble], "object", preview_button);
-
-       /* create page duration button */
-       char buf[DEF_BUF_LEN_S + 1] = {0,};
-       int pageduration = msg_ui_composer_pageduration_value_get(cd);
-       snprintf(buf, sizeof(buf), _MSGSTR("IDS_MSGC_BUTTON2_DURATION_N_HPD_SECS"), pageduration);
+       /* fix ctx_popup flashing issue because of focus */
+       ctx_popup = elm_ctxpopup_add(cd->main_window);
+       elm_ctxpopup_direction_priority_set(ctx_popup, ELM_CTXPOPUP_DIRECTION_DOWN,
+                                                 ELM_CTXPOPUP_DIRECTION_UNKNOWN,
+                                                 ELM_CTXPOPUP_DIRECTION_UNKNOWN,
+                                                 ELM_CTXPOPUP_DIRECTION_UNKNOWN);
 
-       Evas_Object *duration_button = __toolbar_btn_create(toolbar, buf, "naviframe_control/multiline");
-       evas_object_smart_callback_add(duration_button, "clicked", __pageduration_btn_clicked_cb, cd);
-       cd->toolbar_btn[CONTROLBAR_ITEM_2+isBubble] = duration_button;
-       cd->toolbar_item_top[CONTROLBAR_ITEM_2+isBubble] = elm_toolbar_item_append(toolbar, NULL, NULL, NULL, cd);
-       elm_object_item_part_content_set(cd->toolbar_item_top[CONTROLBAR_ITEM_2+isBubble], "object", duration_button);
+       evas_object_smart_callback_add(ctx_popup, "dismissed", __msg_ui_composer_ctxpopup_dismissed_cb, cd);
 
-       COMPOSER_MSG_TYPE_E checked_type = msg_ui_composer_check_message_type(cd);
-       if (checked_type == COMPOSER_MSG_TYPE_MMS) {
-               msg_ui_composer_toolbar_top_item_change(cd, false);
-       } else {
-               msg_ui_composer_toolbar_top_item_change(cd, true);
+       if (cd->msg_ug_mode == MSG_UG_MODE_BUBBLE_COMPOSER)
+               elm_ctxpopup_item_append(ctx_popup, dgettext("sys_string", "IDS_COM_SK_DELETE"), NULL, msg_ui_bubble_more_delete_clicked_cb, cd);
+
+       if (cd->msg_type == COMPOSER_MSG_TYPE_MMS) {
+               /* preview */
+               if (msg_ui_composer_body_has_media(cd))
+                       elm_ctxpopup_item_append(ctx_popup, MSGC_STR_PREVIEW, NULL, __preview_btn_clicked_cb, cd);
+
+               /* page duration */
+               char buf[DEF_BUF_LEN_S + 1] = {0,};
+               char duration[DEF_BUF_LEN_D + 1] = {0,};
+               const char *str = _MSGSTR("IDS_MSGC_OPT2_DURATION_HPS_SEC_ABB");
+               int pageduration = msg_ui_composer_pageduration_value_get(cd);
+
+               snprintf(duration, sizeof(duration)-1, "%d", pageduration);
+               snprintf(buf, sizeof(buf)-1, str, duration);
+               elm_ctxpopup_item_append(ctx_popup, buf, NULL, __pageduration_btn_clicked_cb, cd);
        }
 
-       D_LEAVE;
-
-       return toolbar;
-}
-
-void msg_ui_composer_toolbar_top_update(MSG_COMPOSER_VIEW_DATA_S *cd)
-{
-       D_ENTER;
-       D_MSG_RETM_IF(cd == NULL, "Composer Data is NULL");
-
-       /* update pageduration */
-       char buf[DEF_BUF_LEN_S + 1] = {0,};
-       int pageduration = 0;
-       int isBubble = 0;
-       char *markup_str = NULL;
-
        if (cd->msg_ug_mode == MSG_UG_MODE_BUBBLE_COMPOSER)
-               isBubble = 1;
+               elm_ctxpopup_item_append(ctx_popup, dgettext(MESSAGE_PKGNAME, "IDS_MSG_HEADER_BACKUP"), NULL, msg_ui_bubble_backup_clicked_cb, cd);
 
-       pageduration = msg_ui_composer_pageduration_value_get(cd);
-       snprintf(buf, sizeof(buf), _MSGSTR("IDS_MSGC_BUTTON2_DURATION_N_HPD_SECS"), pageduration);
+       Evas_Coord x = 0;
+       Evas_Coord y = 0;
+       Evas_Coord w = 0;
+       Evas_Coord h = 0;
+       evas_object_geometry_get(cd->more_btn, &x, &y, &w, &h);
+       evas_object_move(ctx_popup, (x+(w/2)) , y+h);
+       evas_object_show(ctx_popup);
 
-       markup_str = elm_entry_utf8_to_markup(buf);
-       if (markup_str) {
-               elm_object_text_set(cd->toolbar_btn[CONTROLBAR_ITEM_2+isBubble], markup_str);
-               g_free(markup_str);
-       } else {
-               elm_object_text_set(cd->toolbar_btn[CONTROLBAR_ITEM_2+isBubble], buf);
-       }
+       cd->ctx_popup = ctx_popup;
+
+       MSG_UI_LEAVE();
 }
 
-static void __naviframe_more_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+static void __naviframe_compose_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info)
 {
        D_ENTER;
-       MSG_COMPOSER_VIEW_DATA_S *cd = data;
-       D_MSG_RETM_IF(cd == NULL, "Composer Data is NULL");
-       D_MSG_RETM_IF(cd->navi_it == NULL, "Navi item is NULL");
+       MSG_UI_RET_IF(MSG_UI_LEVEL_ERR, !data || !obj);
 
-       if (cd->navi_optionheader_opened) {
-               elm_object_item_signal_emit(cd->navi_it, "elm,state,optionheader,close", "");
-               elm_object_signal_emit(cd->navi_title_layout, "elm,state,more,hide", "");
-       } else {
-               Evas_Object *content = NULL;
-
-               if (cd->msg_ug_mode == MSG_UG_MODE_BUBBLE_COMPOSER) {
-                       PMSG_BUBBLE_DATA bubble_data = cd->bubble_data;
-
-                       if (bubble_data && bubble_data->title_optionheader_opened) {
-                               elm_object_signal_emit(cd->navi_title_layout, "elm,state,title,hide", "");
-                               if (bubble_data->title_genlist)
-                                       msg_ui_bubble_close_title_menu_genlist(bubble_data);
-                               bubble_data->title_optionheader_opened = false;
-                       }
-               }
-
-               content = elm_object_item_part_content_unset(cd->navi_it, "optionheader");
-
-               if (content) {
-                       if (content != cd->toolbar_top) {
-                               PMSG_BUBBLE_DATA bubble_data = cd->bubble_data;
-                               int i = 0;
-                               for (i = 0; i < MSG_BUBBLE_CONTROLBAR_ITEM_NUM; i++) {
-                                       if (bubble_data->toolbar_item[i]) {
-                                               elm_object_item_del(bubble_data->toolbar_item[i]);
-                                               bubble_data->toolbar_item[i] = NULL;
-                                       }
-                               }
-                       }
-                       evas_object_del(content);
-               }
-
-               cd->toolbar_top  =  __toolbar_top_create(cd);
-               elm_object_item_part_content_set(cd->navi_it, "optionheader", cd->toolbar_top);
+       MSG_COMPOSER_VIEW_DATA_S *cd = (MSG_COMPOSER_VIEW_DATA_S *)data;
 
-               elm_object_item_signal_emit(cd->navi_it, "elm,state,optionheader,open", "");
-               elm_object_signal_emit(cd->navi_title_layout, "elm,state,more,show", "");
+       if (cd->bubble_data->popup) {
+               evas_object_del(cd->bubble_data->popup);
+               cd->bubble_data->popup = NULL;
        }
 
-       cd->navi_optionheader_opened = !cd->navi_optionheader_opened;
+       service_h svc_handle;
 
+       if (service_create(&svc_handle) < 0 || svc_handle == NULL) {
+               D_EMSG("service_create() is failed !!");
+       } else {
+               service_add_extra_data(svc_handle, MSG_BUNDLE_KEY_MODE, MSG_BUNDLE_VALUE_EDIT);
+               service_add_extra_data(svc_handle, MSG_BUNDLE_KEY_FROM, MSG_BUNDLE_VALUE_INTERNAL);
+               msg_ui_composer_launch_composer_create(cd, svc_handle);
+               service_destroy(svc_handle);
+       }
        D_LEAVE;
 }
 
@@ -878,14 +808,13 @@ static Evas_Object *__naviframe_back_btn_create(Evas_Object *parent, void *data,
        D_MSG_RETVM_IF(data == NULL, NULL, "data == NULL");
        D_MSG("Title type = %d", title);
 
-       Evas_Object *btn;
+       Evas_Object *btn = NULL;
        btn = elm_button_add(parent);
        if (btn == NULL)
                return NULL;
 
        if (title == true) {
-               elm_object_style_set(btn, "naviframe/title/default");
-               elm_object_text_set(btn, MSGC_STR_BUTTON_CANCEL);
+               elm_object_style_set(btn, "naviframe/back_btn/default");
        } else {
                elm_object_style_set(btn, "naviframe/back_btn/default");
        }
@@ -906,46 +835,33 @@ static Evas_Object *__naviframe_more_btn_create(Evas_Object *parent, void *data)
                return NULL;
 
        elm_object_style_set(btn, "naviframe/more/default");
-       elm_object_focus_allow_set(btn, EINA_FALSE);
 
-       evas_object_smart_callback_add(btn, "clicked", __naviframe_more_btn_clicked_cb, data);
+       evas_object_smart_callback_add(btn, "clicked", msg_composer_naviframe_more_btn_clicked_cb, data);
        evas_object_show(btn);
        D_LEAVE;
        return btn;
 }
 
-static char *__working_dir_create(void)
+static Evas_Object *__naviframe_compose_btn_create(Evas_Object *parent, void *data)
 {
        D_ENTER;
-       char *base_dir = "/tmp/message";
-       char working_path[DEF_PATH_MAX] = {0,};
-       int i = 0;
-
-       /*Create base dir*/
-       if (ecore_file_exists(base_dir) == EINA_FALSE) {
-               if(ecore_file_mkdir(base_dir) == EINA_FALSE) {
-                       return NULL;
-               }
-       }
-
-       /*Create work dir*/
-       do {
+       D_MSG_RETVM_IF(parent == NULL, NULL, "parent == NULL");
+       D_MSG_RETVM_IF(data == NULL, NULL, "data == NULL");
 
-               bzero(working_path, DEF_PATH_MAX);
-               snprintf(working_path, sizeof(working_path)-1, "%s/composer_%d/", base_dir, i);
-               if (ecore_file_exists(working_path) == EINA_FALSE) {
-                       if (ecore_file_mkdir(working_path) == EINA_FALSE) {
-                               return NULL;
-                       } else {
-                               D_MSG("Success to create working path = %s", working_path);
-                               return strdup(working_path);
-                       }
-                       break;
-               }
-               i++;
-       } while(i < 255);
+       Evas_Object *btn = elm_button_add(parent);
+       if (!btn)
+               return NULL;
+       elm_object_style_set(btn, "naviframe/title_icon");
+
+       Evas_Object *icon = elm_icon_add(btn);
+       elm_image_file_set(icon, MSG_IMAGES_EDJ, MSG_UI_THREAD_LIST_TITLE_ICON_COMPOSE);
+       elm_image_resizable_set(icon, 1, 1);
+       evas_object_image_smooth_scale_set(icon, 0);
+       elm_object_content_set(btn, icon);
+       evas_object_smart_callback_add(btn, "clicked", __naviframe_compose_btn_clicked_cb, data);
+       D_LEAVE;
 
-       return NULL;
+       return btn;
 }
 
 void msg_ui_composer_reset_request(MSG_COMPOSER_VIEW_DATA_S *cd, service_h svc_handle)
@@ -957,6 +873,7 @@ void msg_ui_composer_reset_request(MSG_COMPOSER_VIEW_DATA_S *cd, service_h svc_h
 
        COMPOSER_EDIT_STATE_E edit_state = __msg_ui_composer_edit_check(cd);
        D_MSG("edit_state = %d", edit_state);
+       D_MSG("composer mode = %d, msg_ug_mode = %d", cd->composer_mode, cd->msg_ug_mode);
 
        if (cd->msg_ug_mode == MSG_UG_MODE_FULL_COMPOSER || cd->msg_ug_mode == MSG_UG_MODE_ONLY_COMPOSER) {
                if (edit_state == COMPOSER_EDIT_RECIPIENT_AND_BODY) {
@@ -973,11 +890,14 @@ void msg_ui_composer_reset_request(MSG_COMPOSER_VIEW_DATA_S *cd, service_h svc_h
                if (edit_state == COMPOSER_EDIT_RECIPIENT) {
                        PMSG_BUBBLE_DATA bubble_data = cd->bubble_data;
 
+                       if (bubble_data->title_menu_opened)
+                               msg_ui_bubble_close_title_menu_genlist(bubble_data);
+
                        if (bubble_data->bubble_count == 0) {
                                int err = MSG_SUCCESS;
 
                                if (bubble_data->isDraft == true)
-                                       err = msg_delete_thread_message_list(bubble_data->msgHandle, bubble_data->threadId);
+                                       err = msg_delete_thread_message_list(bubble_data->msgHandle, bubble_data->threadId, false);
 
                                if (err == MSG_SUCCESS) {
                                        service_h svc_handle;
@@ -998,13 +918,13 @@ void msg_ui_composer_reset_request(MSG_COMPOSER_VIEW_DATA_S *cd, service_h svc_h
                                }
                        } else {
                                /* delete draft message */
-                               msg_struct_list_s msg_list;
+                               msg_struct_list_s msg_list = {0,};
 
                                if (msg_get_message_list(cd->msg_handle, MSG_DRAFT_ID, bubble_data->threadId, 0, 0, &msg_list) == COMPOSER_RETURN_SUCCESS) {
                                        int i = 0;
                                        int msgid = 0;
 
-                                       for (i= 0; i < msg_list.nCount; i++) {
+                                       for (i = 0; i < msg_list.nCount; i++) {
                                                msg_get_int_value(msg_list.msg_struct_info[i], MSG_MESSAGE_ID_INT, &msgid);
                                                D_MSG("draft msg_id is %d", msgid);
                                                if (msg_delete_message(cd->msg_handle, msgid) != COMPOSER_RETURN_SUCCESS)
@@ -1050,23 +970,48 @@ COMPOSER_RETURN_TYPE_E msg_ui_composer_reset(MSG_COMPOSER_VIEW_DATA_S *cd, servi
                g_free(cd->working_path);
        }
 
-       cd->working_path = __working_dir_create();
+       cd->working_path = msg_composer_create_working_dir();
 
        if (cd->working_path == NULL) {
-               D_EMSG("[ASSERT] Fail of make working dir!!!");
+               D_EMSG("Fail of make working dir!!!");
                return COMPOSER_RETURN_FAIL;
        }
 
        if (svc_handle) {
                msg_ui_composer_clear(cd);
-               /*Change to Bubble view*/
+
                char *thread_id = NULL;
                char *msg_id = NULL;
+               char *composer_mode = NULL;
+               char *from = NULL;
+
                service_get_extra_data(svc_handle, MSG_BUNDLE_KEY_THREAD_ID, &thread_id);
                service_get_extra_data(svc_handle, MSG_BUNDLE_KEY_MSG_ID, &msg_id);
-               if (thread_id || msg_id) {
+               service_get_extra_data(svc_handle, MSG_BUNDLE_KEY_MODE, &composer_mode);
+               service_get_extra_data(svc_handle, MSG_BUNDLE_KEY_FROM, &from);
+
+               if (composer_mode) {
+                       if (g_strcmp0(composer_mode, MSG_BUNDLE_VALUE_EDIT) == 0)
+                               cd->composer_mode = MSG_COMPOSER_MODE_EDIT;
+                       else if (g_strcmp0(composer_mode, MSG_BUNDLE_VALUE_FORWARD) == 0)
+                               cd->composer_mode = MSG_COMPOSER_MODE_FORWARD;
+                       else
+                               cd->composer_mode = MSG_COMPOSER_MODE_NORMAL;
+               } else {
+                       cd->composer_mode = MSG_COMPOSER_MODE_NORMAL;
+               }
+
+               if (from && g_strcmp0(from, MSG_BUNDLE_VALUE_INTERNAL) == 0)
+                       cd->isMsgInternal = true;
+               else
+                       cd->isMsgInternal = false;
+
+               /*Change to Bubble view*/
+               if ((thread_id || msg_id) && cd->composer_mode == MSG_COMPOSER_MODE_NORMAL) {
+                       D_MSG("bubble view composer mode = %d, msg_ug_mode = %d", cd->composer_mode, cd->msg_ug_mode);
+
                        if (cd->msg_ug_mode == MSG_UG_MODE_FULL_COMPOSER) {
-                               D_MSG("chagne bubble view");
+                               D_MSG("change bubble view");
                                msg_ui_composer_change_bubble_view(cd);
                                msg_ui_bubble_parse_bubble_data(cd->bubble_data, svc_handle);
                                msg_ui_bubble_start_view(cd->bubble_data);
@@ -1074,7 +1019,6 @@ COMPOSER_RETURN_TYPE_E msg_ui_composer_reset(MSG_COMPOSER_VIEW_DATA_S *cd, servi
 
                                /* set recipient list for bubble composer */
                                msg_ui_composer_recipient_set_recipient_list(cd, cd->bubble_data->threadId);
-
                        } else if (cd->msg_ug_mode == MSG_UG_MODE_BUBBLE_COMPOSER) {
                                D_MSG("reload bubble view");
                                msg_ui_bubble_parse_bubble_data(cd->bubble_data, svc_handle);
@@ -1083,20 +1027,34 @@ COMPOSER_RETURN_TYPE_E msg_ui_composer_reset(MSG_COMPOSER_VIEW_DATA_S *cd, servi
 
                                /* set recipient list for bubble composer */
                                msg_ui_composer_recipient_set_recipient_list(cd, cd->bubble_data->threadId);
+                       } else {
+                               D_EMSG("Invalid type");
                        }
+
+                       cd->msg_ug_mode = MSG_UG_MODE_BUBBLE_COMPOSER;
                } else {
+                       D_MSG("normal composer composer mode = %d, msg_ug_mode = %d", cd->composer_mode, cd->msg_ug_mode);
+
                        if (cd->msg_ug_mode == MSG_UG_MODE_BUBBLE_COMPOSER) {
+                               D_MSG("change composer view");
                                if (cd->bubble_data) {
                                        cd->bubble_data->ug_state = BUBBLE_UG_DESTROY;
-                                       MSGC_EVAS_OBJECT_DEL(cd->bubble_data->toolbar);
                                        msg_ui_bubble_deinit_bubble_data(cd->bubble_data);
                                        cd->bubble_data = NULL;
                                }
+
                                msg_ui_composer_change_composer_view(cd);
                        }
+
+                       if (cd->isMsgInternal == true)
+                               cd->msg_ug_mode = MSG_UG_MODE_FULL_COMPOSER;
+                       else
+                               cd->msg_ug_mode = MSG_UG_MODE_ONLY_COMPOSER;
+
                        __msg_ui_composer_bundle_data_process(cd, svc_handle);
                }
        }
+
        D_LEAVE;
        return COMPOSER_RETURN_SUCCESS;
 }
@@ -1106,10 +1064,10 @@ COMPOSER_RETURN_TYPE_E msg_ui_composer_start(MSG_COMPOSER_VIEW_DATA_S *cd, servi
        D_ENTER;
        D_MSG_RETVM_IF(cd == NULL, COMPOSER_RETURN_FAIL, "Composer Data is NULL");
 
-       COMPOSER_RETURN_TYPE_E ret;
+       COMPOSER_RETURN_TYPE_E ret = COMPOSER_RETURN_SUCCESS;
        cd->state = COMPOSER_STATE_TYPE_RUNNING;
 
-       /*bundle data parsing */
+       /* bundle data parsing */
        if (svc_handle) {
                if (cd->msg_ug_mode == MSG_UG_MODE_FULL_COMPOSER || cd->msg_ug_mode == MSG_UG_MODE_ONLY_COMPOSER) {
                        cd->isLoad = true;
@@ -1130,16 +1088,18 @@ COMPOSER_RETURN_TYPE_E msg_ui_composer_start(MSG_COMPOSER_VIEW_DATA_S *cd, servi
                }
        }
 
-       /*First Focus*/
+       /* set first focus*/
        if (cd->msg_ug_mode == MSG_UG_MODE_FULL_COMPOSER || cd->msg_ug_mode == MSG_UG_MODE_ONLY_COMPOSER) {
                if (!msg_ui_composer_popup_exist(cd)) {
 
                        int recipient_count = msg_ui_composer_recipient_count_get(cd->recipient);
 
-                       if (recipient_count > 0)
+                       if (recipient_count > 0) {
                                msg_ui_composer_body_focus_set(cd, 0);
-                       else
+                               msg_ui_composer_recipient_expanded_set(cd->recipient, EINA_FALSE);
+                       } else {
                                msg_ui_composer_recipient_focus_set(cd->recipient);
+                       }
                }
        }
 
@@ -1147,6 +1107,55 @@ COMPOSER_RETURN_TYPE_E msg_ui_composer_start(MSG_COMPOSER_VIEW_DATA_S *cd, servi
        return ret;
 }
 
+static void __msg_composer_auto_save_and_delete_msg(MSG_COMPOSER_VIEW_DATA_S *cd)
+{
+       D_ENTER;
+       D_MSG_RETM_IF(cd == NULL, "Composer Data is NULL");
+
+       /* save and delete msg */
+       if (!cd->disable_auto_save_mode) {
+               COMPOSER_EDIT_STATE_E edit_state = __msg_ui_composer_edit_check(cd);
+               if (edit_state == COMPOSER_EDIT_RECIPIENT_AND_BODY) {
+                       /* auto save composer data */
+                       msg_ui_composer_message_init();
+
+                       if (msg_ui_composer_get_message_data(cd) == COMPOSER_RETURN_SUCCESS) {
+                               D_MSG("save draft message");
+                               msg_ui_composer_save_message(cd->msg_handle);
+                               /* show saved ticker popup */
+                               msg_ui_composer_common_tickernoti(cd, COMPOSER_TICKERNOTI_AUTO_SAVED);
+                       }
+
+                       msg_ui_composer_message_destroy();
+               } else if (edit_state == COMPOSER_EDIT_RECIPIENT) {
+                       if (cd->msg_ug_mode == MSG_UG_MODE_BUBBLE_COMPOSER) {
+                               /* delete draft message */
+                               MSG_BUBBLE_DATA *bubble_data = cd->bubble_data;
+
+                               if (bubble_data) {
+                                       msg_struct_list_s msg_list = {0,};
+
+                                       if (msg_get_message_list(cd->msg_handle, MSG_DRAFT_ID, bubble_data->threadId, 0, 0, &msg_list) == MSG_SUCCESS) {
+                                               int i = 0;
+                                               int msgid = 0;
+
+                                               D_MSG("delete draft message");
+                                               for (i = 0; i < msg_list.nCount; i++) {
+                                                       msg_get_int_value(msg_list.msg_struct_info[i], MSG_MESSAGE_ID_INT, &msgid);
+                                                       D_MSG("draft msg_id is %d", msgid);
+                                                       if (msg_delete_message(cd->msg_handle, msgid) != COMPOSER_RETURN_SUCCESS)
+                                                               D_EMSG("msg_ui_comp_core_delete_message is failed = %d", msgid);
+                                               }
+                                       }
+                                       msg_release_list_struct(&msg_list);
+                               }
+                       }
+               }
+       }
+
+       D_LEAVE;
+}
+
 COMPOSER_RETURN_TYPE_E msg_ui_composer_destroy(MSG_COMPOSER_VIEW_DATA_S *cd)
 {
        D_ENTER;
@@ -1156,7 +1165,13 @@ COMPOSER_RETURN_TYPE_E msg_ui_composer_destroy(MSG_COMPOSER_VIEW_DATA_S *cd)
                return COMPOSER_RETURN_FAIL;
 
        D_PRINT("===== Composer UG Destroy Start =====");
-       contacts_svc_disconnect();
+
+       __msg_composer_auto_save_and_delete_msg(cd);
+
+       /* discoonect volume key handler */
+       msg_ui_composer_disconnect_handler(cd);
+
+       contacts_disconnect2();
 
        D_PRINT("----- Unregister vconf callback -----");
        if (vconf_ignore_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, __msgc_vconf_changed_cb) < 0) {
@@ -1166,6 +1181,12 @@ COMPOSER_RETURN_TYPE_E msg_ui_composer_destroy(MSG_COMPOSER_VIEW_DATA_S *cd)
                D_EMSG("Fail to unregister vconf CB with [%s]", VCONFKEY_MSG_APP_FONT_SIZE);
        }
 
+       if (cd->tapi_handle) {
+               if (tel_deinit(cd->tapi_handle) != TAPI_API_SUCCESS)
+                       D_EMSG("tel_deinit is failed");
+               cd->tapi_handle = NULL;
+       }
+
        if(cd->job_thread_end) {
                D_PRINT("----- Job Delete -----");
                ecore_job_del(cd->job_thread_end);
@@ -1184,9 +1205,9 @@ COMPOSER_RETURN_TYPE_E msg_ui_composer_destroy(MSG_COMPOSER_VIEW_DATA_S *cd)
                cd->last_focus_idler = NULL;
        }
 
-       if (cd->popup_conform) {
-               evas_object_del(cd->popup_conform);
-               cd->popup_conform = NULL;
+       if (cd->flight_mode_timer) {
+               ecore_timer_del(cd->flight_mode_timer);
+               cd->flight_mode_timer = NULL;
        }
 
        if (cd->recipient) {
@@ -1221,7 +1242,9 @@ COMPOSER_RETURN_TYPE_E msg_ui_composer_destroy(MSG_COMPOSER_VIEW_DATA_S *cd)
                elm_theme_free(cd->th);
                cd->th = NULL;
        }
-       msg_common_reset_font_size("entry");
+
+       /* rollback indicator mode to previous mode */
+       elm_win_indicator_mode_set(cd->main_window, cd->indicator_mode);
 
        D_PRINT("===== Composer UG Destroy End =====");
 
@@ -1229,10 +1252,72 @@ COMPOSER_RETURN_TYPE_E msg_ui_composer_destroy(MSG_COMPOSER_VIEW_DATA_S *cd)
        return ret;
 }
 
+void msg_ui_composer_change_language(MSG_COMPOSER_VIEW_DATA_S *cd)
+{
+       D_ENTER;
+       D_MSG_RETM_IF(cd == NULL, "cd is NULL");
+
+       if (cd->msg_ug_mode == MSG_UG_MODE_FULL_COMPOSER || cd->msg_ug_mode == MSG_UG_MODE_ONLY_COMPOSER) {
+               /* destroy popup */
+               msg_ui_composer_popup_delete_all(cd);
+
+               if (cd->ctx_popup) {
+                       evas_object_del(cd->ctx_popup);
+                       cd->ctx_popup = NULL;
+               }
+
+               /* title */
+               msg_ui_composer_navi_title_set(cd);
+
+               /* recipient */
+               if (cd->recipient) {
+                       Evas_Object *mbe = cd->recipient->mbe;
+
+                       /* set mbe label */
+                       char label_txt[TO_FIELD_LABEL_SIZE_MAX] = { 0, };
+                       gsize len = 0;
+
+                       len = snprintf(label_txt, (gsize)sizeof(label_txt), "%s:", MSGC_STR_TO);
+                       if (len == -1) {
+                               D_EMSG("len = %d", len);
+                       } else if (len > 0) {
+                               label_txt[len] = '\0';
+                               elm_object_text_set(mbe, label_txt);
+                       } else {
+                               D_EMSG("len = %d", len);
+                       }
+
+                       /* set guide text */
+                       elm_object_part_text_set(mbe, "guide", MSGC_STR_ADD_RECIPIENT);
+               }
+
+               /* subject */
+               if (cd->sub_data.entry)
+                       edje_object_part_text_set(_EDJ(cd->sub_data.layout), "subject.guidetxt", MSGC_STR_SUBJECT);
+
+               /* attachment */
+               if (cd->ly_attach_main) {
+                       char buf[DEF_BUF_LEN_S + 1] = {0,};
+                       const char *str = _MSGSTR("IDS_MSGC_BODY_PD_ATTACHMENTS");
+
+                       snprintf(buf, sizeof(buf), str, cd->attach_data.attachment_Cnt);
+                       edje_object_part_text_set(_EDJ(cd->ly_attach_main), "text.filename", buf);
+               }
+
+               /* mms size */
+               if (cd->msg_type == COMPOSER_MSG_TYPE_MMS)
+                       msg_ui_composer_body_info_area_update(cd);
+       }
+
+       cd->isclosed = false;
+
+       D_LEAVE;
+}
+
 COMPOSER_RETURN_TYPE_E msg_ui_composer_rotate(MSG_COMPOSER_VIEW_DATA_S *cd, COMPOSER_ROTATE_TYPE_E rotate)
 {
        D_ENTER;
-       D_MSG_RETVM_IF(cd == NULL, COMPOSER_RETURN_FAIL, "Composer Data == NULL");
+       D_MSG_RETVM_IF(cd == NULL, COMPOSER_RETURN_FAIL, "cd is NULL");
 
        cd->rotate = rotate;
        D_MSG("rotate val [%d]", rotate);
@@ -1245,12 +1330,15 @@ COMPOSER_RETURN_TYPE_E msg_ui_composer_rotate(MSG_COMPOSER_VIEW_DATA_S *cd, COMP
                if (rotate == COMPOSER_ROTATE_PORTRAIT || rotate == COMPOSER_ROTATE_PORTRAIT_UPSIDEDOWN) {
                        elm_layout_theme_set(cd->base, "layout", "application", "default");
 
+                       elm_win_indicator_mode_set(cd->main_window, ELM_WIN_INDICATOR_SHOW);
+
                        elm_box_horizontal_set(r->bx_main, EINA_FALSE);
                        elm_scroller_content_min_limit(r->sc, EINA_FALSE, EINA_TRUE);
                        evas_object_size_hint_max_set(r->sc, 9999, COMPOSER_RECIPIENT_PORTRAIT_HEIGHT_MAX);
-               } else {
+               } else if (rotate == COMPOSER_ROTATE_LANDSCAPE || rotate == COMPOSER_ROTATE_LANDSCAPE_UPSIDEDOWN) {
                        elm_layout_theme_set(cd->base, "layout", "application", "noindicator");/*hide indicator in Landscape*/
-
+                       elm_win_indicator_mode_set(cd->main_window, ELM_WIN_INDICATOR_HIDE);
+                       D_MSG("hide indicator");
                        elm_box_horizontal_set(r->bx_main, EINA_TRUE);
                        elm_scroller_content_min_limit(r->sc, EINA_FALSE, EINA_FALSE);
                        evas_object_size_hint_max_set(r->sc, 9999, -1);
@@ -1263,11 +1351,24 @@ COMPOSER_RETURN_TYPE_E msg_ui_composer_rotate(MSG_COMPOSER_VIEW_DATA_S *cd, COMP
                if (rotate == COMPOSER_ROTATE_PORTRAIT || rotate == COMPOSER_ROTATE_PORTRAIT_UPSIDEDOWN) {
                        if (cd->bubble_data)
                                cd->bubble_data->isRotate = false;
-               } else {
-                       if (cd->bubble_data)
+
+                       if (cd->compose_btn) {
+                               evas_object_hide(cd->compose_btn);
+                               elm_object_part_content_unset(cd->navi_title_layout, "compose_btn");
+                       }
+               } else if (rotate == COMPOSER_ROTATE_LANDSCAPE || rotate == COMPOSER_ROTATE_LANDSCAPE_UPSIDEDOWN) {
+                       if (cd->bubble_data) {
                                cd->bubble_data->isRotate = true;
+
+                               if (cd->compose_btn && cd->bubble_data->viewmode == BUBBLE_NORMAL_VIEW) {
+                                       evas_object_show(cd->compose_btn);
+                                       elm_object_part_content_set(cd->navi_title_layout, "compose_btn", cd->compose_btn);
+                               }
+                       }
                }
 
+               elm_win_indicator_mode_set(cd->main_window, ELM_WIN_INDICATOR_SHOW);
+
                /* change body scroller size */
                msg_ui_composer_change_body_scroll_size(cd, 0);
 
@@ -1302,12 +1403,12 @@ COMPOSER_RETURN_TYPE_E msg_ui_composer_init(MSG_COMPOSER_VIEW_DATA_S *cd)
        }
 
        /* connect contacts svc*/
-       if (contacts_svc_connect() != 0) {
-               D_EMSG("[ASSERT] Fail of contacts_svc_connect !!!");
+       if (contacts_connect2() != 0) {
+               D_EMSG("[ASSERT] Fail of contacts_connect2 !!!");
                return COMPOSER_RETURN_FAIL;
        }
 
-       cd->working_path = __working_dir_create();
+       cd->working_path = msg_composer_create_working_dir();
        if (cd->working_path == NULL) {
                D_EMSG("[ASSERT] Fail of make working dir!!!");
                return COMPOSER_RETURN_FAIL;
@@ -1316,7 +1417,25 @@ COMPOSER_RETURN_TYPE_E msg_ui_composer_init(MSG_COMPOSER_VIEW_DATA_S *cd)
        /* set default message type is SMS */
        cd->msg_type = COMPOSER_MSG_TYPE_SMS;
 
-       if(cd->mms_max_size == 0) {
+       /* get sms setting */
+       msg_struct_t sms_sent_opt = msg_create_struct(MSG_STRUCT_SETTING_SMS_SEND_OPT);
+
+       if (msg_get_sms_send_opt(cd->msg_handle, sms_sent_opt) != MSG_SUCCESS) {
+               D_EMSG("Getting SMS_SEND_OP ERROR");
+       } else {
+               msg_get_int_value(sms_sent_opt, MSG_SMS_SENDOPT_ENCODE_TYPE_INT, &cd->encode_mode);
+               D_MSG("SMS Encode mode is %d", cd->encode_mode);
+       }
+
+       msg_release_struct(&sms_sent_opt);
+
+       if (cd->cms_max_page == 0) {
+               // TODO: get cms max page from msgfw when it is supported by msgfw.
+               cd->cms_max_page = COMPOSER_CMS_MAX_PAGE;
+       }
+
+       /* get mms max size */
+       if (cd->mms_max_size == 0) {
                msg_struct_t setting = msg_create_struct(MSG_STRUCT_SETTING_MSGSIZE_OPT);
 
                if (msg_get_msgsize_opt(cd->msg_handle, setting) != MSG_SUCCESS) {
@@ -1325,8 +1444,7 @@ COMPOSER_RETURN_TYPE_E msg_ui_composer_init(MSG_COMPOSER_VIEW_DATA_S *cd)
                        if (setting)
                                msg_get_int_value(setting, MSG_MESSAGE_SIZE_INT, &cd->mms_max_size);
 
-                       D_MSG("[DEBUG] msg max size = [%d KB] !!!", cd->mms_max_size);
-
+                       D_MSG("msg max size = [%d KB] !!!", cd->mms_max_size);
                        cd->mms_max_size = cd->mms_max_size * 1024;
                }
                msg_release_struct(&setting);
@@ -1335,6 +1453,9 @@ COMPOSER_RETURN_TYPE_E msg_ui_composer_init(MSG_COMPOSER_VIEW_DATA_S *cd)
        /* set default font size*/
        __msgc_init_font_size(cd);
 
+       /* coonect volume key handler */
+       msg_ui_composer_connect_handler(cd);
+
        /* register vconf callback function */
        if (vconf_notify_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, __msgc_vconf_changed_cb, cd) < 0) {
                D_EMSG("Fail to register vconf CB with [%s]", VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE);
@@ -1362,9 +1483,9 @@ COMPOSER_RETURN_TYPE_E msg_ui_composer_create(MSG_COMPOSER_VIEW_DATA_S *cd)
 
        Evas_Object *navi_frame = NULL;
        Evas_Object *more_button = NULL;
+       Evas_Object *compose_button = NULL;
        Evas_Object *content_layout = NULL;
        Elm_Object_Item *navi_it = NULL;
-       Evas_Object *conform = NULL;
        Evas_Object *back_btn = NULL;
 
        /* State Set */
@@ -1404,15 +1525,6 @@ COMPOSER_RETURN_TYPE_E msg_ui_composer_create(MSG_COMPOSER_VIEW_DATA_S *cd)
 
        cd->content_layout = content_layout;
 
-       /*Create conformant */
-       conform = msg_ui_composer_conformant_create(cd->main_window, content_layout);
-       if (!conform) {
-               D_EMSG("Fail to create conformant");
-               goto error_return;
-       }
-
-       cd->conform = conform;
-
        /*Create content*/
        if (cd->msg_ug_mode == MSG_UG_MODE_FULL_COMPOSER || cd->msg_ug_mode == MSG_UG_MODE_ONLY_COMPOSER) {
                cd->recipient = msg_ui_composer_recipient_create(content_layout, 1, cd);
@@ -1458,7 +1570,7 @@ COMPOSER_RETURN_TYPE_E msg_ui_composer_create(MSG_COMPOSER_VIEW_DATA_S *cd)
                back_btn = __naviframe_back_btn_create(navi_frame, (void *)cd, false);
        }
 
-       navi_it = elm_naviframe_item_push(navi_frame, NULL, NULL, NULL, conform, "empty");
+       navi_it = elm_naviframe_item_push(navi_frame, NULL, NULL, NULL, content_layout, "empty");
 
        cd->navi_it = navi_it;
        cd->back_btn = back_btn;
@@ -1476,6 +1588,22 @@ COMPOSER_RETURN_TYPE_E msg_ui_composer_create(MSG_COMPOSER_VIEW_DATA_S *cd)
 
        cd->more_btn = more_button;
 
+       if (cd->msg_type == COMPOSER_MSG_TYPE_SMS)
+               elm_object_disabled_set(cd->more_btn, EINA_TRUE);
+
+       /*Create compose button*/
+       compose_button = __naviframe_compose_btn_create(navi_frame, cd);
+
+       if (cd->bubble_data != NULL && cd->bubble_data->isRotate == true) {
+               evas_object_show(compose_button);
+               elm_object_part_content_set(cd->navi_title_layout, "compose_btn", compose_button);
+       } else {
+               evas_object_hide(compose_button);
+               elm_object_part_content_unset(cd->navi_title_layout, "compose_btn");
+       }
+
+       cd->compose_btn = compose_button;
+
        /* set navibar to main layout (base) */
        elm_object_part_content_set(cd->base, "elm.swallow.content", navi_frame);
 
@@ -1500,7 +1628,7 @@ COMPOSER_RETURN_TYPE_E msg_ui_composer_bubble_data_set(MSG_COMPOSER_VIEW_DATA_S
 
        /*Create bubble list*/
        bubble_data->threadId = thread_id;
-       MSG_UI_DEBUG(MSG_UI_LEVEL_DEBUG, "Thread ID = %d", bubble_data->threadId);
+       D_MSG("Thread ID = %d", bubble_data->threadId);
 
        msg_struct_list_s addrList;
        int i = 0;
@@ -1528,7 +1656,7 @@ COMPOSER_RETURN_TYPE_E msg_ui_composer_bubble_data_set(MSG_COMPOSER_VIEW_DATA_S
 
                msg_release_list_struct(&addrList);
        } else {
-               MSG_UI_DEBUG(MSG_UI_LEVEL_DEBUG, "[ERROR] msg_get_address_list returns error [%d]", err);
+               D_MSG("[ERROR] msg_get_address_list returns error [%d]", err);
        }
 
        threadInfo = msg_create_struct(MSG_STRUCT_THREAD_INFO);
@@ -1537,7 +1665,7 @@ COMPOSER_RETURN_TYPE_E msg_ui_composer_bubble_data_set(MSG_COMPOSER_VIEW_DATA_S
        if (err == MSG_SUCCESS)
                msg_get_str_value(threadInfo, MSG_THREAD_NAME_STR, bubble_data->threadName, DEF_THREAD_NAME_LEN);
        else
-               MSG_UI_DEBUG(MSG_UI_LEVEL_DEBUG, "[ERROR] msg_get_trhead returns error [%d", err);
+               D_MSG("[ERROR] msg_get_trhead returns error [%d", err);
 
        msg_release_struct(&threadInfo);
 
@@ -1565,12 +1693,12 @@ COMPOSER_RETURN_TYPE_E msg_ui_composer_change_composer_view(MSG_COMPOSER_VIEW_DA
        elm_object_part_content_set(cd->content_layout, "swl.predictsearch", predict_search_layout);
 
        MSGC_EVAS_OBJECT_DEL(cd->back_btn);
-
        Evas_Object *back_btn = __naviframe_back_btn_create(cd->navi_bar, (void *)cd, true);
-       elm_object_item_part_content_set(cd->navi_it, "title_right_btn", back_btn);
+       elm_object_part_content_set(cd->navi_title_layout, "prev_btn", back_btn);
        cd->back_btn = back_btn;
 
-       elm_object_item_text_set(cd->navi_it, MSGC_STR_NEW_MESSAGE);
+       msg_ui_composer_navi_title_set(cd);
+
        D_LEAVE;
        return COMPOSER_RETURN_SUCCESS;
 }
@@ -1632,14 +1760,6 @@ void msg_ui_composer_editable_set(MSG_COMPOSER_VIEW_DATA_S *cd, Eina_Bool editab
 
                if (cd->more_btn)
                        elm_object_disabled_set(cd->more_btn, EINA_TRUE);
-
-               if (cd->navi_it) {
-                       elm_object_item_signal_emit(cd->navi_it, "elm,state,optionheader,close", "");
-                       elm_object_signal_emit(cd->navi_title_layout, "elm,state,more,hide", "");
-                       elm_object_signal_emit(cd->navi_title_layout, "elm,state,title,hide", "");
-                       cd->navi_optionheader_opened = EINA_FALSE;
-               }
-
        } else {
                elm_object_part_content_set(cd->content_layout, "swl.composer.body", cd->ly_body);
                evas_object_show(cd->ly_body);
@@ -1656,54 +1776,12 @@ void msg_ui_composer_bubble_del_all(void *data, service_h svc_handle)
 {
        D_ENTER;
 
-       MSG_COMPOSER_VIEW_DATA_S *cd = data;
+       MSG_COMPOSER_VIEW_DATA_S *cd = (MSG_COMPOSER_VIEW_DATA_S *)data;
        D_MSG_RETM_IF(cd == NULL, "Composer data is NULL");
 
        ug_send_result(cd->ug, svc_handle);
 }
 
-void msg_ui_composer_toolbar_top_item_change(MSG_COMPOSER_VIEW_DATA_S *cd, bool smstype)
-{
-       D_ENTER;
-       D_MSG_RETM_IF(cd == NULL, "Composer data is NULL");
-
-       int isBubble = 0;
-
-       if (cd->msg_ug_mode == MSG_UG_MODE_BUBBLE_COMPOSER) {
-               isBubble = 1;
-
-               PMSG_BUBBLE_DATA bubble_data = cd->bubble_data;
-               if (bubble_data->bubble_count <= 0) {
-                       elm_object_item_disabled_set(cd->toolbar_item_top[CONTROLBAR_ITEM_1], EINA_TRUE);
-                       elm_object_focus_allow_set(cd->toolbar_btn[CONTROLBAR_ITEM_1], EINA_FALSE);
-                       elm_object_disabled_set(cd->toolbar_btn[CONTROLBAR_ITEM_1], EINA_TRUE);
-               }
-       }
-
-       if (smstype == true) {
-               if (cd->toolbar_item_top[CONTROLBAR_ITEM_1]) {
-                       elm_object_item_disabled_set(cd->toolbar_item_top[CONTROLBAR_ITEM_1+isBubble], EINA_TRUE);
-                       elm_object_focus_allow_set(cd->toolbar_btn[CONTROLBAR_ITEM_1+isBubble], EINA_FALSE);
-                       elm_object_disabled_set(cd->toolbar_btn[CONTROLBAR_ITEM_1+isBubble], EINA_TRUE);
-
-                       elm_object_item_disabled_set(cd->toolbar_item_top[CONTROLBAR_ITEM_2+isBubble], EINA_TRUE);
-                       elm_object_focus_allow_set(cd->toolbar_btn[CONTROLBAR_ITEM_2+isBubble], EINA_FALSE);
-                       elm_object_disabled_set(cd->toolbar_btn[CONTROLBAR_ITEM_2+isBubble], EINA_TRUE);
-               }
-       } else {
-               if (cd->toolbar_item_top[CONTROLBAR_ITEM_1]) {
-                       elm_object_item_disabled_set(cd->toolbar_item_top[CONTROLBAR_ITEM_1+isBubble], EINA_FALSE);
-                       elm_object_focus_allow_set(cd->toolbar_btn[CONTROLBAR_ITEM_1+isBubble], EINA_TRUE);
-                       elm_object_disabled_set(cd->toolbar_btn[CONTROLBAR_ITEM_1+isBubble], EINA_FALSE);
-
-                       elm_object_item_disabled_set(cd->toolbar_item_top[CONTROLBAR_ITEM_2+isBubble], EINA_FALSE);
-                       elm_object_focus_allow_set(cd->toolbar_btn[CONTROLBAR_ITEM_2+isBubble], EINA_TRUE);
-                       elm_object_disabled_set(cd->toolbar_btn[CONTROLBAR_ITEM_2+isBubble], EINA_FALSE);
-               }
-       }
-       D_LEAVE;
-}
-
 Evas_Object *msg_ui_composer_create_navi_title_bar(void *data)
 {
        D_ENTER;
@@ -1733,12 +1811,12 @@ void msg_ui_composer_navi_title_set(void *data)
                return;
        }
 
-       MSG_COMPOSER_VIEW_DATA_S *cd = data;
+       MSG_COMPOSER_VIEW_DATA_S *cd = (MSG_COMPOSER_VIEW_DATA_S *)data;
        PMSG_BUBBLE_DATA bubble_data = cd->bubble_data;
 
        if (cd->msg_ug_mode == MSG_UG_MODE_FULL_COMPOSER || cd->msg_ug_mode == MSG_UG_MODE_ONLY_COMPOSER) {
                elm_object_part_text_set(cd->navi_title_layout, "title_text", MSGC_STR_NEW_MESSAGE);
-       } else if (cd->msg_ug_mode ==  MSG_UG_MODE_BUBBLE_COMPOSER){
+       } else if (cd->msg_ug_mode ==  MSG_UG_MODE_BUBBLE_COMPOSER) {
                Evas_Object *title_button = NULL;
 
                elm_object_part_text_set(cd->navi_title_layout, "title_text", ""); // text part clear first
@@ -1754,15 +1832,19 @@ void msg_ui_composer_navi_title_set(void *data)
                if (bubble_data->addr_list.addr_cnt == 1) {
                        if (bubble_data->addr_list.addr_info[0].contact_id > 0 && bubble_data->addr_list.addr_info[0].name[0] != '\0')
                                elm_object_text_set(title_button, bubble_data->addr_list.addr_info[0].name);
-                       else
+                       else if (bubble_data->addr_list.addr_info[0].address[0] != '\0')
                                elm_object_text_set(title_button, bubble_data->addr_list.addr_info[0].address);
+                       else
+                               elm_object_text_set(title_button, dgettext("sys_string", "IDS_COM_BODY_UNKNOWN"));
                } else if (bubble_data->addr_list.addr_cnt > 1) {
                        char title_text[DEF_BUF_LEN+1] = {0,};
 
                        if (bubble_data->addr_list.addr_info[0].contact_id > 0 && bubble_data->addr_list.addr_info[0].name[0] != '\0')
                                snprintf(title_text, sizeof(title_text), "%s +%d", bubble_data->addr_list.addr_info[0].name, bubble_data->addr_list.addr_cnt-1);
-                       else
+                       else if (bubble_data->addr_list.addr_info[0].address[0] != '\0')
                                snprintf(title_text, sizeof(title_text), "%s +%d", bubble_data->addr_list.addr_info[0].address, bubble_data->addr_list.addr_cnt-1);
+                       else
+                               snprintf(title_text, sizeof(title_text), "%s +%d", dgettext("sys_string", "IDS_COM_BODY_UNKNOWN"), bubble_data->addr_list.addr_cnt-1);
 
                        elm_object_text_set(title_button, title_text);
                } else {
@@ -1779,3 +1861,177 @@ void msg_ui_composer_navi_title_set(void *data)
                return;
        }
 }
+
+static Eina_Bool __msgc_up_key_long_press_cb(void *data)
+{
+       D_ENTER;
+       D_MSG_RETVM_IF(data == NULL, EINA_FALSE, "cd is NULL");
+       MSG_COMPOSER_VIEW_DATA_S *cd = (MSG_COMPOSER_VIEW_DATA_S *)data;
+
+       if (!msg_common_increase_font_size()) {
+               cd->vol_up_key_longpress = NULL;
+               return EINA_FALSE;
+       }
+
+       /* apply font size */
+       if (cd->msg_ug_mode == MSG_UG_MODE_BUBBLE_COMPOSER)
+               msg_common_apply_font_size("bubble", cd->content_layout);
+
+       msg_ui_composer_apply_font_size(cd, false);
+
+       return EINA_TRUE;
+}
+
+static Eina_Bool __msgc_down_key_long_press_cb(void *data)
+{
+       D_ENTER;
+       D_MSG_RETVM_IF(data == NULL, EINA_FALSE, "cd is NULL");
+       MSG_COMPOSER_VIEW_DATA_S *cd = (MSG_COMPOSER_VIEW_DATA_S *)data;
+
+       if (!msg_common_decrease_font_size()) {
+               cd->vol_down_key_longpress = NULL;
+               return EINA_FALSE;
+       }
+
+       /* apply font size */
+       if (cd->msg_ug_mode == MSG_UG_MODE_BUBBLE_COMPOSER)
+               msg_common_apply_font_size("bubble", cd->content_layout);
+
+       msg_ui_composer_apply_font_size(cd, false);
+
+       return EINA_TRUE;
+}
+
+Eina_Bool msg_ui_composer_key_release_cb(void *data, int type, void *event)
+{
+       D_ENTER;
+       D_MSG_RETVM_IF(data == NULL, EINA_FALSE, "cd is NULL");
+       D_MSG_RETVM_IF(event == NULL, EINA_FALSE, "event is NULL");
+       MSG_COMPOSER_VIEW_DATA_S *cd = (MSG_COMPOSER_VIEW_DATA_S *)data;
+       Ecore_Event_Key *ev = (Ecore_Event_Key *)event;
+       int use_volume_key = false;
+
+       vconf_get_bool(VCONFKEY_MSG_APP_USE_VOLUME_KEY, &use_volume_key);
+
+       if (use_volume_key) {
+               if (!g_strcmp0(ev->keyname, KEY_VOLUMEUP)) {    /* KEY_VOLUMEUP */
+                       D_MSG("KEY_VOLUMEUP is released");
+
+                       if (cd->vol_up_key_longpress) {
+                               ecore_timer_del(cd->vol_up_key_longpress);
+                               cd->vol_up_key_longpress = NULL;
+                       }
+               } else if (!g_strcmp0(ev->keyname, KEY_VOLUMEDOWN)) {   /* KEY_VOLUMEDOWN */
+                       D_MSG("KEY_VOLUMEDOWN is released");
+
+                       if (cd->vol_down_key_longpress) {
+                               ecore_timer_del(cd->vol_down_key_longpress);
+                               cd->vol_down_key_longpress = NULL;
+                       }
+               } else {
+                       D_MSG("key_name is not applicable!");
+               }
+       } else {
+               D_MSG("Use volume key setting is not activated. Do volume key action");
+       }
+
+       return EINA_TRUE;
+}
+
+Eina_Bool msg_ui_composer_key_press_cb(void *data, int type, void *event)
+{
+       D_ENTER;
+       D_MSG_RETVM_IF(data == NULL, EINA_FALSE, "cd is NULL");
+       D_MSG_RETVM_IF(event == NULL, EINA_FALSE, "event is NULL");
+       MSG_COMPOSER_VIEW_DATA_S *cd = (MSG_COMPOSER_VIEW_DATA_S *)data;
+       Ecore_Event_Key *ev = (Ecore_Event_Key *)event;
+       int use_volume_key = false;
+
+       vconf_get_bool(VCONFKEY_MSG_APP_USE_VOLUME_KEY, &use_volume_key);
+
+       if (use_volume_key) {
+               if (!g_strcmp0(ev->keyname, KEY_VOLUMEUP)) {    /* KEY_VOLUMEUP */
+                       D_MSG("KEY_VOLUMEUP is pressed");
+
+                       msg_common_increase_font_size();
+
+                       /* apply font size */
+                       if (cd->msg_ug_mode == MSG_UG_MODE_BUBBLE_COMPOSER)
+                               msg_common_apply_font_size("bubble", cd->content_layout);
+
+                       msg_ui_composer_apply_font_size(cd, false);
+
+                       cd->vol_up_key_longpress = ecore_timer_add(0.1, (Ecore_Task_Cb) __msgc_up_key_long_press_cb, (void *)cd);
+               } else if (!g_strcmp0(ev->keyname, KEY_VOLUMEDOWN)) {   /* KEY_VOLUMEDOWN */
+                       D_MSG("KEY_VOLUMEDOWN is pressed");
+
+                       msg_common_decrease_font_size();
+
+                       /* apply font size */
+                       if (cd->msg_ug_mode == MSG_UG_MODE_BUBBLE_COMPOSER)
+                               msg_common_apply_font_size("bubble", cd->content_layout);
+
+                       msg_ui_composer_apply_font_size(cd, false);
+
+                       cd->vol_down_key_longpress = ecore_timer_add(0.1, (Ecore_Task_Cb) __msgc_down_key_long_press_cb, (void *)cd);
+               } else {
+                       D_MSG("key_name is not applicable!");
+               }
+       } else {
+               D_MSG("Use volume key setting is not activated. Do volume key action");
+       }
+
+       return EINA_TRUE;
+}
+
+void msg_ui_composer_connect_handler(MSG_COMPOSER_VIEW_DATA_S *cd)
+{
+       D_ENTER;
+       D_MSG_RETM_IF(cd == NULL, "cd is NULL");
+
+       int use_volume_key = 0;
+       vconf_get_bool(VCONFKEY_MSG_APP_USE_VOLUME_KEY, &use_volume_key);
+
+       if (use_volume_key) {
+               msg_ui_composer_grab_key_setting(cd->xdisplay, cd->main_window);
+               /* connect key handler for volume up/down */
+               if (!cd->volkey_press_handler)
+                       cd->volkey_press_handler = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, msg_ui_composer_key_press_cb, (void *)cd);
+
+               if (!cd->volkey_release_handler)
+                       cd->volkey_release_handler = ecore_event_handler_add(ECORE_EVENT_KEY_UP, msg_ui_composer_key_release_cb, (void *)cd);
+       }
+       D_MSG("use_volume_key = %d", use_volume_key);
+
+       D_LEAVE;
+}
+
+void msg_ui_composer_disconnect_handler(MSG_COMPOSER_VIEW_DATA_S *cd)
+{
+       D_ENTER;
+       D_MSG_RETM_IF(cd == NULL, "cd is NULL");
+
+       if (cd->volkey_press_handler) {
+               ecore_event_handler_del(cd->volkey_press_handler);
+               cd->volkey_press_handler = NULL;
+       }
+
+       if (cd->vol_down_key_longpress) {
+               ecore_timer_del(cd->vol_down_key_longpress);
+               cd->vol_down_key_longpress = NULL;
+       }
+
+       if (cd->volkey_release_handler) {
+               ecore_event_handler_del(cd->volkey_release_handler);
+               cd->volkey_release_handler = NULL;
+       }
+
+       if (cd->vol_up_key_longpress) {
+               ecore_timer_del(cd->vol_up_key_longpress);
+               cd->vol_up_key_longpress = NULL;
+       }
+
+       msg_ui_composer_ungrab_key_setting(cd->xdisplay, cd->main_window);
+
+       D_LEAVE;
+}