Modify coding guidelines 22/51522/1 accepted/tizen/mobile/20151111.044552 submit/tizen_mobile/20151110.095201
authorPrakash <prakashc.p@samsung.com>
Tue, 10 Nov 2015 09:35:50 +0000 (15:05 +0530)
committerPrakash <prakashc.p@samsung.com>
Tue, 10 Nov 2015 09:35:50 +0000 (15:05 +0530)
Change-Id: I6dc72cd7058817e9dbbbf85ad7164775789a6b8a
Signed-off-by: Prakash <prakashc.p@samsung.com>
inc/utils/audio-recorder-utils.h
inc/utils/config.h
inc/utils/logger.h
inc/view/audio-recorder-view.h
src/attach-panel-voicerecorder.c
src/utils/audio-recorder-utils.c
src/view/audio-recorder-view.c

index 60940f9..72a030d 100644 (file)
 /**
  * @brief Enumerations for audio recording quality
  */
-typedef enum
-{
-    AQ_LOW = 0,
-    AQ_MEDIUM,
-    AQ_HIGH
+typedef enum {
+       AQ_LOW = 0,
+       AQ_MEDIUM,
+       AQ_HIGH
 } audio_recording_quality_e;
 
 /**
index 2a08bb9..581be11 100644 (file)
@@ -66,16 +66,16 @@ static inline const char *get_resource_path(const char * file_path);
 
 static inline const char *get_resource_path(const char *file_path)
 {
-    static char absolute_path[MAX_LENGTH_PATH] = {'\0'};
+       static char absolute_path[MAX_LENGTH_PATH] = {'\0'};
 
-    static char *res_path_buff = NULL;
-    if (res_path_buff == NULL) {
-        res_path_buff = app_get_resource_path();
-    }
+       static char *res_path_buff = NULL;
+       if (res_path_buff == NULL) {
+               res_path_buff = app_get_resource_path();
+       }
 
-    snprintf(absolute_path, MAX_LENGTH_PATH, "%s%s", res_path_buff, file_path);
+       snprintf(absolute_path, MAX_LENGTH_PATH, "%s%s", res_path_buff, file_path);
 
-    return absolute_path;
+       return absolute_path;
 }
 
 #endif /* CONFIG_H_ */
index b211792..0d6c6a3 100644 (file)
 #define ERR(fmt, arg...) dlog_print(DLOG_ERROR, LOG_TAG, fmt,  ##arg)
 
 #define WARN_IF(expr, fmt, arg...) \
-{ \
-    if (expr) \
-    { \
-        ERR(fmt, ##arg); \
-    } \
-}
+       { \
+               if (expr) \
+               { \
+                       ERR(fmt, ##arg); \
+               } \
+       }
 
 #define RETM_IF(expr, fmt, arg...) \
-{ \
-    if (expr) \
-    { \
-        ERR(fmt, ##arg); \
-        return; \
-    } \
-}
+       { \
+               if (expr) \
+               { \
+                       ERR(fmt, ##arg); \
+                       return; \
+               } \
+       }
 
 #define RETVM_IF(expr, val, fmt, arg...) \
-{ \
-    if (expr) \
-    { \
-        ERR(fmt, ##arg); \
-        return (val); \
-    } \
-}
+       { \
+               if (expr) \
+               { \
+                       ERR(fmt, ##arg); \
+                       return (val); \
+               } \
+       }
 
 #endif /* __LOGGER_H__ */
index 748b181..a59b6bb 100644 (file)
 #define FALSE 0
 #endif
 
-typedef enum _audio_recorder_view_type{
+typedef enum _audio_recorder_view_type {
        AUDIO_RECORDER_FULL_VIEW,
        AUDIO_RECORDER_COMPACT_VIEW,
-}AudioRecorderViewType;
+} AudioRecorderViewType;
 
-struct _audio_recorder_view
-{
-    Evas_Object *layout;
-    Evas_Object *gesture_long_tap;
-    Elm_Object_Item *settings_item;
-    recorder_h recorder;
-    recorder_audio_codec_e *codec_list;
-    int codec_list_len;
-    char file_path[PATH_MAX];
-    char file_name[PATH_MAX];
-    recorder_audio_codec_e codec;
-    recorder_file_format_e file_format;
-    FILE *preproc_file;
-    ui_gadget_h ug_handle;
-    app_control_h service;
-    int bitrate;
-    int sample_rate;
-    bool is_recording;
-    long long int limitsize;
+struct _audio_recorder_view {
+       Evas_Object *layout;
+       Evas_Object *gesture_long_tap;
+       Elm_Object_Item *settings_item;
+       recorder_h recorder;
+       recorder_audio_codec_e *codec_list;
+       int codec_list_len;
+       char file_path[PATH_MAX];
+       char file_name[PATH_MAX];
+       recorder_audio_codec_e codec;
+       recorder_file_format_e file_format;
+       FILE *preproc_file;
+       ui_gadget_h ug_handle;
+       app_control_h service;
+       int bitrate;
+       int sample_rate;
+       bool is_recording;
+       long long int limitsize;
 };
 
 typedef struct _audio_recorder_view audio_recorder_view;
index 29c1c44..a8d1d89 100644 (file)
@@ -30,7 +30,7 @@
 struct ug_data *g_ugd;
 
 #ifdef ENABLE_UG_CREATE_CB
-extern int ug_create_cb(void (*create_cb)(char*,char*,char*,void*), void *user_data);
+extern int ug_create_cb(void (*create_cb)(char*, char*, char*, void*), void *user_data);
 #endif
 
 bool __attachPanelVoiceRecorder_get_extra_data_cb(app_control_h service, const char *key, void * user_data);
@@ -86,8 +86,9 @@ static Evas_Object *__attachPanelVoiceRecorder_create_fullview(Evas_Object *pare
        Evas_Object *base = NULL;
 
        base = elm_layout_add(parent);
-       if (!base)
+       if (!base) {
                return NULL;
+       }
 
        elm_layout_theme_set(base, "layout", "application", "default");
        elm_win_indicator_mode_set(parent, ELM_WIN_INDICATOR_SHOW);
@@ -101,8 +102,9 @@ static Evas_Object *__attachPanelVoiceRecorder_create_frameview(Evas_Object *par
        Evas_Object *base = NULL;
 
        base = elm_layout_add(parent);
-       if (!base)
+       if (!base) {
                return NULL;
+       }
 
        elm_layout_theme_set(base, "standard", "window", "integration");
        edje_object_signal_emit(_EDJ(base), "elm,state,show,content", "elm");
@@ -112,14 +114,15 @@ static Evas_Object *__attachPanelVoiceRecorder_create_frameview(Evas_Object *par
 #endif
 
 static void *__attachPanelVoiceRecorder_on_create(ui_gadget_h ug, enum ug_mode mode, app_control_h service,
-                      void *priv)
+        void *priv)
 {
        Evas_Object *parent = NULL;
        struct ug_data *ugd = NULL;
        char *operation = NULL;
 
-       if (!ug || !priv)
+       if (!ug || !priv) {
                return NULL;
+       }
 
        LOGD("__attachPanelVoiceRecorder_on_create start");
        bindtextdomain("attach-panel-voicerecorder", "/usr/ug/res/locale");
@@ -143,8 +146,9 @@ static void *__attachPanelVoiceRecorder_on_create(ui_gadget_h ug, enum ug_mode m
        app_control_foreach_extra_data(service, __attachPanelVoiceRecorder_get_extra_data_cb, NULL);
 
        parent = (Evas_Object *)ug_get_parent_layout(ug);
-       if (!parent)
+       if (!parent) {
                return NULL;
+       }
 
        char *contact_id = NULL;
        app_control_get_extra_data(service, "__CALLER_PANEL__", &contact_id);
@@ -173,7 +177,7 @@ static void __attachPanelVoiceRecorder_on_start(ui_gadget_h ug, app_control_h se
        int status;
        int a = 1;
 
-       for (i=0; i<10; i++) {
+       for (i = 0; i < 10; i++) {
                thr_id = pthread_create(&p_thread[i], NULL, __attachPanelVoiceRecorder_start_t_func, (void*)&a);
                if (thr_id < 0) {
                        perror("thread create error: ");
@@ -186,6 +190,7 @@ static void __attachPanelVoiceRecorder_on_start(ui_gadget_h ug, app_control_h se
 
 static void __attachPanelVoiceRecorder_on_pause(ui_gadget_h ug, app_control_h service, void *priv)
 {
+       LOGD("%s : called\n", __func__);
 }
 
 static void __attachPanelVoiceRecorder_on_resume(ui_gadget_h ug, app_control_h service, void *priv)
@@ -197,8 +202,9 @@ static void __attachPanelVoiceRecorder_on_destroy(ui_gadget_h ug, app_control_h
 {
        struct ug_data *ugd;
        LOGD("%s : called\n", __func__);
-       if (!ug || !priv)
+       if (!ug || !priv) {
                return;
+       }
 
        ugd = priv;
        evas_object_del(ugd->base);
@@ -206,7 +212,7 @@ static void __attachPanelVoiceRecorder_on_destroy(ui_gadget_h ug, app_control_h
 }
 
 static void __attachPanelVoiceRecorder_on_message(ui_gadget_h ug, app_control_h msg, app_control_h service,
-                     void *priv)
+        void *priv)
 {
        if (!ug || !priv) {
                LOGD("Invalid ug or priv");
@@ -220,7 +226,7 @@ static void __attachPanelVoiceRecorder_on_message(ui_gadget_h ug, app_control_h
                LOGD("called by attach panel ");
                app_control_get_extra_data(msg, APP_CONTROL_DATA_SELECTION_MODE, &display_mode);
                if (display_mode) {
-                       if(!strcmp(display_mode, "single")) {
+                       if (!strcmp(display_mode, "single")) {
                                //change to compact view
                                LOGD("compact view ");
                                _audio_recorder_view_set_view_layout(AUDIO_RECORDER_COMPACT_VIEW);
@@ -236,7 +242,7 @@ static void __attachPanelVoiceRecorder_on_message(ui_gadget_h ug, app_control_h
 }
 
 static void __attachPanelVoiceRecorder_on_event(ui_gadget_h ug, enum ug_event event, app_control_h service,
-                   void *priv)
+        void *priv)
 {
        /*int degree = -1;*/
 
@@ -256,10 +262,11 @@ static void __attachPanelVoiceRecorder_on_event(ui_gadget_h ug, enum ug_event ev
 
 #if 0
 static void __attachPanelVoiceRecorder_on_key_event(ui_gadget_h ug, enum ug_key_event event,
-                        app_control_h service, void *priv)
+        app_control_h service, void *priv)
 {
-       if (!ug)
+       if (!ug) {
                return;
+       }
 
        switch (event) {
        case UG_KEY_EVENT_END:
@@ -281,12 +288,14 @@ UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops)
 {
        struct ug_data *ugd;
 
-       if (!ops)
+       if (!ops) {
                return -1;
+       }
 
        ugd = calloc(1, sizeof(struct ug_data));
-       if (!ugd)
+       if (!ugd) {
                return -1;
+       }
 
        ops->create = __attachPanelVoiceRecorder_on_create;
        ops->start = __attachPanelVoiceRecorder_on_start;
@@ -304,8 +313,9 @@ UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops)
 
 UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops)
 {
-       if (!ops)
+       if (!ops) {
                return;
+       }
 
        /*struct ug_data *ugd;
        ugd = ops->priv;
index 87c1b08..4014192 100644 (file)
 #include <assert.h>
 #include <stdlib.h>
 
-typedef struct
-{
-    recorder_audio_codec_e *codec_list;
-    int len;
+typedef struct {
+       recorder_audio_codec_e *codec_list;
+       int len;
 } supported_encoder_data;
 
-typedef struct
-{
-    int samplerate;
-    int channel;
-    int bitrate;
-    recorder_audio_codec_e codec;
-    audio_recording_quality_e quality;
+typedef struct {
+       int samplerate;
+       int channel;
+       int bitrate;
+       recorder_audio_codec_e codec;
+       audio_recording_quality_e quality;
 } audio_quality_table;
 
-static const audio_quality_table audio_quality[] =
-{
-    {8000,  1, 256000,  RECORDER_AUDIO_CODEC_PCM, AQ_LOW},
-    {22050, 2, 706000,  RECORDER_AUDIO_CODEC_PCM, AQ_MEDIUM},
-    {44100, 2, 1411000, RECORDER_AUDIO_CODEC_PCM, AQ_HIGH},
-    {8000,  1, 4750,    RECORDER_AUDIO_CODEC_AMR, AQ_LOW},
-    {8000,  1, 7950,    RECORDER_AUDIO_CODEC_AMR, AQ_MEDIUM},
-    {8000,  1, 12200,   RECORDER_AUDIO_CODEC_AMR, AQ_HIGH},
-    {22050, 2, 120000,  RECORDER_AUDIO_CODEC_AAC, AQ_LOW},
-    {44100, 2, 220000,  RECORDER_AUDIO_CODEC_AAC, AQ_MEDIUM},
-    {44100, 2, 320000,  RECORDER_AUDIO_CODEC_AAC, AQ_HIGH}
+static const audio_quality_table audio_quality[] = {
+       {8000,  1, 256000,  RECORDER_AUDIO_CODEC_PCM, AQ_LOW},
+       {22050, 2, 706000,  RECORDER_AUDIO_CODEC_PCM, AQ_MEDIUM},
+       {44100, 2, 1411000, RECORDER_AUDIO_CODEC_PCM, AQ_HIGH},
+       {8000,  1, 4750,    RECORDER_AUDIO_CODEC_AMR, AQ_LOW},
+       {8000,  1, 7950,    RECORDER_AUDIO_CODEC_AMR, AQ_MEDIUM},
+       {8000,  1, 12200,   RECORDER_AUDIO_CODEC_AMR, AQ_HIGH},
+       {22050, 2, 120000,  RECORDER_AUDIO_CODEC_AAC, AQ_LOW},
+       {44100, 2, 220000,  RECORDER_AUDIO_CODEC_AAC, AQ_MEDIUM},
+       {44100, 2, 320000,  RECORDER_AUDIO_CODEC_AAC, AQ_HIGH}
 };
 
 static bool _recorder_supported_audio_encoder_cb(recorder_audio_codec_e codec, void *user_data);
 
 void audio_recorder_save_preprocessing(bool preprocessing)
 {
-    //preference_set_boolean(VCONF_PREPROC_KEY, preprocessing);
+       //preference_set_boolean(VCONF_PREPROC_KEY, preprocessing);
 }
 
 bool audio_recorder_read_preprocessing()
 {
-    bool val = false;
-    //_get_boolean(VCONF_PREPROC_KEY, &val);
-    return val;
+       bool val = false;
+       //_get_boolean(VCONF_PREPROC_KEY, &val);
+       return val;
 }
 
 void audio_recorder_set_quality(recorder_h recorder, audio_recording_quality_e quality)
 {
-    RETM_IF(!recorder, "recorder is null");
-
-    int size = sizeof(audio_quality) / sizeof(audio_quality_table);
-
-    recorder_audio_codec_e codec = RECORDER_AUDIO_CODEC_DISABLE;
-    recorder_get_audio_encoder(recorder, &codec);
-
-    if (codec != RECORDER_AUDIO_CODEC_DISABLE) {
-        int i;
-        for (i = 0; i < size; ++i) {
-            if (audio_quality[i].codec == codec && audio_quality[i].quality == quality) {
-                recorder_attr_set_audio_samplerate(recorder, audio_quality[i].samplerate);
-                recorder_attr_set_audio_channel(recorder, audio_quality[i].channel);
-                recorder_attr_set_audio_encoder_bitrate(recorder, audio_quality[i].bitrate);
-                break;
-            }
-        }
-    }
+       RETM_IF(!recorder, "recorder is null");
+
+       int size = sizeof(audio_quality) / sizeof(audio_quality_table);
+
+       recorder_audio_codec_e codec = RECORDER_AUDIO_CODEC_DISABLE;
+       recorder_get_audio_encoder(recorder, &codec);
+
+       if (codec != RECORDER_AUDIO_CODEC_DISABLE) {
+               int i;
+               for (i = 0; i < size; ++i) {
+                       if (audio_quality[i].codec == codec && audio_quality[i].quality == quality) {
+                               recorder_attr_set_audio_samplerate(recorder, audio_quality[i].samplerate);
+                               recorder_attr_set_audio_channel(recorder, audio_quality[i].channel);
+                               recorder_attr_set_audio_encoder_bitrate(recorder, audio_quality[i].bitrate);
+                               break;
+                       }
+               }
+       }
 }
 
 
 void audio_recorder_save_quality(audio_recording_quality_e quality)
 {
-   // preference_set_int(VCONF_QUALITY_KEY, quality);
+       // preference_set_int(VCONF_QUALITY_KEY, quality);
 }
 
 audio_recording_quality_e audio_recorder_read_quality()
 {
-    int val = AQ_LOW;
-   // preference_get_int(VCONF_QUALITY_KEY, &val);
-    return val;
+       int val = AQ_LOW;
+       // preference_get_int(VCONF_QUALITY_KEY, &val);
+       return val;
 }
 
 recorder_audio_codec_e *audio_recorder_get_supported_encoder(recorder_h recorder, int *list_length)
 {
-    supported_encoder_data data = {0};
-    data.codec_list = NULL;
-    data.len = 0;
+       supported_encoder_data data = {0};
+       data.codec_list = NULL;
+       data.len = 0;
 
-    int res = recorder_foreach_supported_audio_encoder(recorder, _recorder_supported_audio_encoder_cb, &data);
+       int res = recorder_foreach_supported_audio_encoder(recorder, _recorder_supported_audio_encoder_cb, &data);
 
-    if (res && list_length) {
-        *list_length = data.len;
-    }
+       if (res && list_length) {
+               *list_length = data.len;
+       }
 
-    return data.codec_list;
+       return data.codec_list;
 }
 
 recorder_file_format_e audio_recorder_get_file_format_by_codec(recorder_h recorder, recorder_audio_codec_e codec)
 {
-    switch (codec){
-        case RECORDER_AUDIO_CODEC_AMR:
-            return RECORDER_FILE_FORMAT_AMR;
-            break;
+       switch (codec) {
+       case RECORDER_AUDIO_CODEC_AMR:
+               return RECORDER_FILE_FORMAT_AMR;
+               break;
 
-        case RECORDER_AUDIO_CODEC_AAC:
-            return RECORDER_FILE_FORMAT_MP4;
-            break;
+       case RECORDER_AUDIO_CODEC_AAC:
+               return RECORDER_FILE_FORMAT_MP4;
+               break;
 
-        case RECORDER_AUDIO_CODEC_PCM:
-            return RECORDER_FILE_FORMAT_WAV;
-            break;
+       case RECORDER_AUDIO_CODEC_PCM:
+               return RECORDER_FILE_FORMAT_WAV;
+               break;
 
-        case RECORDER_AUDIO_CODEC_VORBIS:
-            return RECORDER_FILE_FORMAT_OGG;
-            break;
+       case RECORDER_AUDIO_CODEC_VORBIS:
+               return RECORDER_FILE_FORMAT_OGG;
+               break;
 
-        default:
-            break;
-    }
+       default:
+               break;
+       }
 
-    assert(false);
-    return RECORDER_FILE_FORMAT_WAV;
+       assert(false);
+       return RECORDER_FILE_FORMAT_WAV;
 }
 
 
 const char *audio_recorder_get_preproc_file_name_by_codec(recorder_audio_codec_e codec)
 {
-    switch (codec) {
-        case RECORDER_AUDIO_CODEC_AMR:
-            return get_resource_path(PREPROCAMR);
-            break;
+       switch (codec) {
+       case RECORDER_AUDIO_CODEC_AMR:
+               return get_resource_path(PREPROCAMR);
+               break;
 
-        case RECORDER_AUDIO_CODEC_AAC:
-            return get_resource_path(PREPROCAAC);
-            break;
+       case RECORDER_AUDIO_CODEC_AAC:
+               return get_resource_path(PREPROCAAC);
+               break;
 
-        case RECORDER_AUDIO_CODEC_PCM:
-            return get_resource_path(PREPROCPCM);
-            break;
+       case RECORDER_AUDIO_CODEC_PCM:
+               return get_resource_path(PREPROCPCM);
+               break;
 
-        default:
-            break;
-    }
+       default:
+               break;
+       }
 
-    return "";
+       return "";
 }
 
 static bool _recorder_supported_audio_encoder_cb(recorder_audio_codec_e codec, void *user_data)
 {
-    RETVM_IF(!user_data, false, "data is NULL");
-    bool result = false;
-    supported_encoder_data *data = user_data;
-
-    if (codec != RECORDER_AUDIO_CODEC_DISABLE) {
-        data->codec_list = realloc(data->codec_list, sizeof(recorder_audio_codec_e) * (data->len + 1));
-       if (!data->codec_list) {
-               return false;
+       RETVM_IF(!user_data, false, "data is NULL");
+       bool result = false;
+       supported_encoder_data *data = user_data;
+
+       if (codec != RECORDER_AUDIO_CODEC_DISABLE) {
+               data->codec_list = realloc(data->codec_list, sizeof(recorder_audio_codec_e) * (data->len + 1));
+               if (!data->codec_list) {
+                       return false;
+               }
+               data->codec_list[data->len] = codec;
+               ++(data->len);
+               result = true;
        }
-        data->codec_list[data->len] = codec;
-        ++(data->len);
-        result = true;
-    }
 
-    return result;
+       return result;
 }
 
index fc5effa..95468a8 100644 (file)
@@ -66,256 +66,260 @@ static void _recorder_destroy(audio_recorder_view *view);
 
 #define APP_CONTROL_DATA_FILE_PATH "http://tizen.org/appcontrol/data/file_path"
 
-void _audio_recorder_view_set_data(void *data) {
-    /*RETM_IF(!data, "data is NULL");*/
-    viewhandle = (audio_recorder_view *)data;
+void _audio_recorder_view_set_data(void *data)
+{
+       /*RETM_IF(!data, "data is NULL");*/
+       viewhandle = (audio_recorder_view *)data;
 }
 
-void *_audio_recorder_view_get_data() {
-    if (viewhandle) {
-       return viewhandle;
-    }
-    return NULL;
+void *_audio_recorder_view_get_data()
+{
+       if (viewhandle) {
+               return viewhandle;
+       }
+       return NULL;
 }
 
-void _audio_recorder_view_destroy() {
-     LOGD("Enter _audio_recorder_view_destroy()");
-     audio_recorder_view *view = (audio_recorder_view *)_audio_recorder_view_get_data();
-     if (view) {
-       _recorder_destroy(view);
-     }
-     /*free(viewhandle);*/
-     _audio_recorder_view_set_data(NULL);
+void _audio_recorder_view_destroy()
+{
+       LOGD("Enter _audio_recorder_view_destroy()");
+       audio_recorder_view *view = (audio_recorder_view *)_audio_recorder_view_get_data();
+       if (view) {
+               _recorder_destroy(view);
+       }
+       /*free(viewhandle);*/
+       _audio_recorder_view_set_data(NULL);
 }
 
 static void _on_start_btn_pressed_cb(void *data, Evas_Object *obj,
-        const char *emission, const char *source)
+                                     const char *emission, const char *source)
 {
-    LOGD("Enter _on_start_btn_pressed_cb");
-    RETM_IF(!data, "data is NULL");
+       LOGD("Enter _on_start_btn_pressed_cb");
+       RETM_IF(!data, "data is NULL");
 
-    audio_recorder_view *view = (audio_recorder_view *)data;
-    if (!view->is_recording) {
-       view->is_recording = TRUE;
-       _recorder_start(view);
-    }
+       audio_recorder_view *view = (audio_recorder_view *)data;
+       if (!view->is_recording) {
+               view->is_recording = TRUE;
+               _recorder_start(view);
+       }
 
 }
 
 static void _on_start_btn_clicked_cb(void *data, Evas_Object *obj,
-        const char *emission, const char *source)
+                                     const char *emission, const char *source)
 {
-    LOGD("Enter _on_start_btn_clicked_cb");
-    RETM_IF(!data, "data is NULL");
+       LOGD("Enter _on_start_btn_clicked_cb");
+       RETM_IF(!data, "data is NULL");
 }
 
 static void _on_stop_btn_pressed_cb(void *data, Evas_Object *obj,
-        const char *emission, const char *source)
+                                    const char *emission, const char *source)
 {
-    LOGD("Enter _on_stop_btn_pressed_cb");
-    RETM_IF(!data, "data is NULL");
+       LOGD("Enter _on_stop_btn_pressed_cb");
+       RETM_IF(!data, "data is NULL");
 
-    audio_recorder_view *view = (audio_recorder_view *)data;
+       audio_recorder_view *view = (audio_recorder_view *)data;
 
-    if(view->is_recording) {
-        view->is_recording = FALSE;
-        _recorder_stop(view);
-    }
+       if (view->is_recording) {
+               view->is_recording = FALSE;
+               _recorder_stop(view);
+       }
 }
 
 static void _on_stop_btn_clicked_cb(void *data, Evas_Object *obj,
-        const char *emission, const char *source)
+                                    const char *emission, const char *source)
 {
-    LOGD("Enter _on_stop_btn_clicked_cb");
-    RETM_IF(!data, "data is NULL");
-
-    audio_recorder_view *view = (audio_recorder_view *)data;
-
-    if(view->is_recording) {
-       view->is_recording = FALSE;
-       _recorder_stop(view);
-    } else {
-       char *domain = VR_STR_DOMAIN_LOCAL;
-       int ret = notification_status_message_post(dgettext(domain, STR_NOTIFICATION_TEXT));
-       if (ret != 0)
-               LOGD("notification_status_message_post()... [0x%x]", ret);
-    }
+       LOGD("Enter _on_stop_btn_clicked_cb");
+       RETM_IF(!data, "data is NULL");
+
+       audio_recorder_view *view = (audio_recorder_view *)data;
+
+       if (view->is_recording) {
+               view->is_recording = FALSE;
+               _recorder_stop(view);
+       } else {
+               char *domain = VR_STR_DOMAIN_LOCAL;
+               int ret = notification_status_message_post(dgettext(domain, STR_NOTIFICATION_TEXT));
+               if (ret != 0) {
+                       LOGD("notification_status_message_post()... [0x%x]", ret);
+               }
+       }
 }
 
 #if 0
 static void _on_pause_pressed_cb(void *data, Evas_Object *obj,
-        const char *emission, const char *source)
+                                 const char *emission, const char *source)
 {
-    LOGD("Enter _on_pause_pressed_cb");
-    RETM_IF(!data, "data is NULL");
+       LOGD("Enter _on_pause_pressed_cb");
+       RETM_IF(!data, "data is NULL");
 
-    audio_recorder_view *view = (audio_recorder_view *)data;
+       audio_recorder_view *view = (audio_recorder_view *)data;
 
-    _recorder_pause(view);
+       _recorder_pause(view);
 }
 
 static void _on_cancel_btn_pressed_cb(void *data, Evas_Object *obj,
-        const char *emission, const char *source)
+                                      const char *emission, const char *source)
 {
-    RETM_IF(!data, "data is NULL");
-    audio_recorder_view *view = (audio_recorder_view *)data;
+       RETM_IF(!data, "data is NULL");
+       audio_recorder_view *view = (audio_recorder_view *)data;
 
-    _recorder_cancel(view);
+       _recorder_cancel(view);
 }
 #endif
 
 static void _recorder_create(audio_recorder_view *view)
 {
-    LOGD("Enter _recorder_create");
+       LOGD("Enter _recorder_create");
 
-    int ret = recorder_create_audiorecorder(&view->recorder);
-    if (ret == RECORDER_ERROR_NONE) {
+       int ret = recorder_create_audiorecorder(&view->recorder);
+       if (ret == RECORDER_ERROR_NONE) {
                recorder_set_recording_status_cb(view->recorder, _on_recording_status_cb, view);
                if (view->limitsize > 0) {
                        recorder_attr_set_size_limit(view->recorder, (view->limitsize) / 1024);
                }
                recorder_set_recording_limit_reached_cb(view->recorder, _on_recording_limit_reached_cb, view);
-    } else {
-       LOGD("recorder_create_audiorecorder not successful error code: %d", ret);
-    }
+       } else {
+               LOGD("recorder_create_audiorecorder not successful error code: %d", ret);
+       }
 }
 
 #if 0
 static void _get_supported_codec_list(audio_recorder_view *view)
 {
-    RETM_IF(!view, "view is NULL");
+       RETM_IF(!view, "view is NULL");
 
-    if (!view->codec_list) {
-        view->codec_list = audio_recorder_get_supported_encoder(view->recorder, &view->codec_list_len);
-    }
+       if (!view->codec_list) {
+               view->codec_list = audio_recorder_get_supported_encoder(view->recorder, &view->codec_list_len);
+       }
 }
 
 static void _codec_set(audio_recorder_view *view, recorder_audio_codec_e codec)
 {
-    RETM_IF(!view, "view is NULL");
+       RETM_IF(!view, "view is NULL");
 
-    view->codec = codec;
-    view->file_format = audio_recorder_get_file_format_by_codec(view->recorder, codec);
+       view->codec = codec;
+       view->file_format = audio_recorder_get_file_format_by_codec(view->recorder, codec);
 }
 
 static void _preproc_set(audio_recorder_view *view, bool preproc)
 {
-    audio_recorder_save_preprocessing(preproc);
+       audio_recorder_save_preprocessing(preproc);
 }
 #endif
 
 static void _recorder_apply_settings(audio_recorder_view *view)
 {
-    if (view->recorder) {
-       recorder_attr_set_audio_channel(view->recorder, 2);
-       recorder_attr_set_audio_device(view->recorder, RECORDER_AUDIO_DEVICE_MIC);
-       recorder_attr_set_time_limit(view->recorder, MAX_TIME);
+       if (view->recorder) {
+               recorder_attr_set_audio_channel(view->recorder, 2);
+               recorder_attr_set_audio_device(view->recorder, RECORDER_AUDIO_DEVICE_MIC);
+               recorder_attr_set_time_limit(view->recorder, MAX_TIME);
 
-        recorder_set_filename(view->recorder, view->file_path);
-        recorder_set_file_format(view->recorder, view->file_format);
-       LOGD("file_format: %d", view->file_format);
-        recorder_set_audio_encoder(view->recorder, view->codec);
-       recorder_attr_set_audio_samplerate(view->recorder, view->sample_rate);
-       recorder_attr_set_audio_encoder_bitrate(view->recorder, view->bitrate);
+               recorder_set_filename(view->recorder, view->file_path);
+               recorder_set_file_format(view->recorder, view->file_format);
+               LOGD("file_format: %d", view->file_format);
+               recorder_set_audio_encoder(view->recorder, view->codec);
+               recorder_attr_set_audio_samplerate(view->recorder, view->sample_rate);
+               recorder_attr_set_audio_encoder_bitrate(view->recorder, view->bitrate);
 
-        recorder_prepare(view->recorder);
+               recorder_prepare(view->recorder);
 
-        char *domain = VR_STR_DOMAIN_LOCAL;
-        elm_object_domain_translatable_part_text_set(view->layout, "recorder_title", domain, STR_RECORDING);
+               char *domain = VR_STR_DOMAIN_LOCAL;
+               elm_object_domain_translatable_part_text_set(view->layout, "recorder_title", domain, STR_RECORDING);
 
-    }
+       }
 }
 
 #if 0
 static void _recorder_preproc_set(audio_recorder_view *view, bool preproc)
 {
-    if (preproc) {
-        recorder_audio_codec_e codec = RECORDER_AUDIO_CODEC_DISABLE;
-        recorder_get_audio_encoder(view->recorder, &codec);
-
-        if (codec != RECORDER_AUDIO_CODEC_DISABLE) {
-            if (view->preproc_file) {
-                fclose(view->preproc_file);
-            }
-
-            const char *file_name = audio_recorder_get_preproc_file_name_by_codec(codec);
-            if (file_name) {
-                view->preproc_file = fopen(file_name, "r");
-                assert(view->preproc_file);
-            }
-
-            recorder_set_audio_stream_cb(view->recorder, _on_recorder_audio_stream_cb, view);
-        }
-    } else {
-        recorder_unset_audio_stream_cb(view->recorder);
-    }
+       if (preproc) {
+               recorder_audio_codec_e codec = RECORDER_AUDIO_CODEC_DISABLE;
+               recorder_get_audio_encoder(view->recorder, &codec);
+
+               if (codec != RECORDER_AUDIO_CODEC_DISABLE) {
+                       if (view->preproc_file) {
+                               fclose(view->preproc_file);
+                       }
+
+                       const char *file_name = audio_recorder_get_preproc_file_name_by_codec(codec);
+                       if (file_name) {
+                               view->preproc_file = fopen(file_name, "r");
+                               assert(view->preproc_file);
+                       }
+
+                       recorder_set_audio_stream_cb(view->recorder, _on_recorder_audio_stream_cb, view);
+               }
+       } else {
+               recorder_unset_audio_stream_cb(view->recorder);
+       }
 }
 #endif
 
 static void _recorder_destroy(audio_recorder_view *view)
 {
-    LOGD("Enter _recorder_destroy");
-    if (view->recorder) {
-        recorder_cancel(view->recorder);
-        recorder_unprepare(view->recorder);
-        recorder_destroy(view->recorder);
-        view->recorder = NULL;
-    }
-    if(view->gesture_long_tap) {
-       evas_object_del(view->gesture_long_tap);
-    }
-    LOGD("End _recorder_destroy");
+       LOGD("Enter _recorder_destroy");
+       if (view->recorder) {
+               recorder_cancel(view->recorder);
+               recorder_unprepare(view->recorder);
+               recorder_destroy(view->recorder);
+               view->recorder = NULL;
+       }
+       if (view->gesture_long_tap) {
+               evas_object_del(view->gesture_long_tap);
+       }
+       LOGD("End _recorder_destroy");
 }
 
 static void _recorder_start(audio_recorder_view *view)
 {
-    LOGD("Enter _recorder_start");
-    if (!view->recorder) {
-        LOGD("Error view->recorder is null");
-        return;
-    }
+       LOGD("Enter _recorder_start");
+       if (!view->recorder) {
+               LOGD("Error view->recorder is null");
+               return;
+       }
 
-    recorder_state_e rec_state;
-    recorder_get_state(view->recorder, &rec_state);
+       recorder_state_e rec_state;
+       recorder_get_state(view->recorder, &rec_state);
 
-    if (rec_state == RECORDER_STATE_PAUSED) {
-        recorder_start(view->recorder);
-        return;
-    }
+       if (rec_state == RECORDER_STATE_PAUSED) {
+               recorder_start(view->recorder);
+               return;
+       }
 
-    struct tm localtime = {0,};
-    time_t rawtime = time(NULL);
-    char filename[256] = {'\0',};
-    char *data_path = "/opt/usr/media/Music/";
+       struct tm localtime = {0,};
+       time_t rawtime = time(NULL);
+       char filename[256] = {'\0',};
+       char *data_path = "/opt/usr/media/Music/";
 
 #if 0
-    /*For MMS*/
-    view->codec = RECORDER_AUDIO_CODEC_AMR;
-    view->file_format = RECORDER_FILE_FORMAT_AMR;
-    view->sample_rate = VR_AUDIO_SOURCE_SAMPLERATE_LOW;
-    view->bitrate = VR_AUDIO_ENCODER_BITRATE_AMR;
-    if (localtime_r(&rawtime, &localtime) != NULL) {
-        snprintf(filename, sizeof(filename), "Voice-%04i-%02i-%02i_%02i:%02i:%02i.amr",
-                            localtime.tm_year + 1900, localtime.tm_mon + 1, localtime.tm_mday,
-                            localtime.tm_hour, localtime.tm_min, localtime.tm_sec);
-    }
+       /*For MMS*/
+       view->codec = RECORDER_AUDIO_CODEC_AMR;
+       view->file_format = RECORDER_FILE_FORMAT_AMR;
+       view->sample_rate = VR_AUDIO_SOURCE_SAMPLERATE_LOW;
+       view->bitrate = VR_AUDIO_ENCODER_BITRATE_AMR;
+       if (localtime_r(&rawtime, &localtime) != NULL) {
+               snprintf(filename, sizeof(filename), "Voice-%04i-%02i-%02i_%02i:%02i:%02i.amr",
+                        localtime.tm_year + 1900, localtime.tm_mon + 1, localtime.tm_mday,
+                        localtime.tm_hour, localtime.tm_min, localtime.tm_sec);
+       }
 #else
-    /*For High Quality*/
-    view->codec = RECORDER_AUDIO_CODEC_AAC;
-    view->file_format = RECORDER_FILE_FORMAT_MP4;
-    view->sample_rate = VR_AUDIO_SOURCE_SAMPLERATE_HIGH;
-    view->bitrate = VR_AUDIO_ENCODER_BITRATE_AAC;
-    if (localtime_r(&rawtime, &localtime) != NULL) {
-        snprintf(filename, sizeof(filename), "Voice-%04i-%02i-%02i_%02i:%02i:%02i.m4a",
-                            localtime.tm_year + 1900, localtime.tm_mon + 1, localtime.tm_mday,
-                            localtime.tm_hour, localtime.tm_min, localtime.tm_sec);
-    }
+       /*For High Quality*/
+       view->codec = RECORDER_AUDIO_CODEC_AAC;
+       view->file_format = RECORDER_FILE_FORMAT_MP4;
+       view->sample_rate = VR_AUDIO_SOURCE_SAMPLERATE_HIGH;
+       view->bitrate = VR_AUDIO_ENCODER_BITRATE_AAC;
+       if (localtime_r(&rawtime, &localtime) != NULL) {
+               snprintf(filename, sizeof(filename), "Voice-%04i-%02i-%02i_%02i:%02i:%02i.m4a",
+                        localtime.tm_year + 1900, localtime.tm_mon + 1, localtime.tm_mday,
+                        localtime.tm_hour, localtime.tm_min, localtime.tm_sec);
+       }
 #endif
-    /*set file path*/
-    snprintf(view->file_path, PATH_MAX, "%s%s", data_path, filename);
-    _recorder_apply_settings(view);
-    recorder_prepare(view->recorder);
-    recorder_start(view->recorder);
+       /*set file path*/
+       snprintf(view->file_path, PATH_MAX, "%s%s", data_path, filename);
+       _recorder_apply_settings(view);
+       recorder_prepare(view->recorder);
+       recorder_start(view->recorder);
 }
 
 static bool _main_file_register(const char *filename)
@@ -347,89 +351,89 @@ static bool _main_file_register(const char *filename)
 
 static void _recorder_stop(audio_recorder_view *view)
 {
-    LOGD("_recorder_stop");
-    int ret = 0;
-    int commitResult = RECORDER_ERROR_NONE;
-    char **path_array = NULL;
-
-    if (view->recorder) {
-        commitResult = recorder_commit(view->recorder);
-       if (commitResult != RECORDER_ERROR_NONE) {
-               LOGD("recorder_commit failed Error [%d]", recorder_commit);
-       }
-
-       _main_file_register(view->file_path);
-       elm_object_part_text_set(view->layout, "recorder_timer", "00 : 00");
-       char *domain = VR_STR_DOMAIN_LOCAL;
-       elm_object_domain_translatable_part_text_set(view->layout, "recorder_title", domain, STR_RECORDER_TITLE);
+       LOGD("_recorder_stop");
+       int ret = 0;
+       int commitResult = RECORDER_ERROR_NONE;
+       char **path_array = NULL;
+
+       if (view->recorder) {
+               commitResult = recorder_commit(view->recorder);
+               if (commitResult != RECORDER_ERROR_NONE) {
+                       LOGD("recorder_commit failed Error [%d]", recorder_commit);
+               }
 
-       /*Return the File To Caller.*/
-       app_control_h app_control = NULL;
-       ret = app_control_create(&app_control);
-       if (ret == APP_CONTROL_ERROR_NONE) {
-               LOGD("APP_CONTROL_ERROR_NONE");
-               if (commitResult == RECORDER_ERROR_NONE) {
-                       path_array = (char**)calloc(1, sizeof(char *));
-                       if (path_array == NULL) {
-                               LOGD("Failed to allocate memory");
-                               app_control_destroy(app_control);
-                               return;
-                       }
-                       path_array[0] = strdup(view->file_path);
-                       ret = app_control_add_extra_data_array(app_control, APP_CONTROL_DATA_PATH, (const char **)path_array, 1);
-                       if (ret != APP_CONTROL_ERROR_NONE) {
-                               LOGD("Add selected path failed!");
+               _main_file_register(view->file_path);
+               elm_object_part_text_set(view->layout, "recorder_timer", "00 : 00");
+               char *domain = VR_STR_DOMAIN_LOCAL;
+               elm_object_domain_translatable_part_text_set(view->layout, "recorder_title", domain, STR_RECORDER_TITLE);
+
+               /*Return the File To Caller.*/
+               app_control_h app_control = NULL;
+               ret = app_control_create(&app_control);
+               if (ret == APP_CONTROL_ERROR_NONE) {
+                       LOGD("APP_CONTROL_ERROR_NONE");
+                       if (commitResult == RECORDER_ERROR_NONE) {
+                               path_array = (char**)calloc(1, sizeof(char *));
+                               if (path_array == NULL) {
+                                       LOGD("Failed to allocate memory");
+                                       app_control_destroy(app_control);
+                                       return;
+                               }
+                               path_array[0] = strdup(view->file_path);
+                               ret = app_control_add_extra_data_array(app_control, APP_CONTROL_DATA_PATH, (const char **)path_array, 1);
+                               if (ret != APP_CONTROL_ERROR_NONE) {
+                                       LOGD("Add selected path failed!");
+                               }
+                               ret = app_control_add_extra_data_array(app_control, APP_CONTROL_DATA_SELECTED , (const char **)path_array, 1);
+                               if (ret != APP_CONTROL_ERROR_NONE) {
+                                       LOGD("Add selected path failed!");
+                               }
                        }
-                       ret = app_control_add_extra_data_array(app_control, APP_CONTROL_DATA_SELECTED , (const char **)path_array, 1);
-                       if (ret != APP_CONTROL_ERROR_NONE) {
-                               LOGD("Add selected path failed!");
+                       ret = ug_send_result(view->ug_handle, app_control);
+                       if (ret < 0) {
+                               LOGD("ug_send_result failed");
                        }
-               }
-               ret = ug_send_result(view->ug_handle, app_control);
-               if (ret < 0) {
-                    LOGD("ug_send_result failed");
-               }
-               app_control_destroy(app_control);
-               if (path_array != NULL) {
-                       if (path_array[0] != NULL) {
-                               free(path_array[0]);
+                       app_control_destroy(app_control);
+                       if (path_array != NULL) {
+                               if (path_array[0] != NULL) {
+                                       free(path_array[0]);
+                               }
+                               free(path_array);
                        }
-                       free(path_array);
+                       /*ug_destroy_me(view->ug_handle);*/
+               } else {
+                       LOGD("Failed to create app control\n");
                }
-               /*ug_destroy_me(view->ug_handle);*/
-       } else {
-            LOGD("Failed to create app control\n");
        }
-    }
 }
 
 #if 0
 static void _recorder_pause(audio_recorder_view *view)
 {
-    LOGD(" Enter _recorder_pause");
+       LOGD(" Enter _recorder_pause");
 
-    if (view->recorder) {
-        int mmf_ret = RECORDER_ERROR_NONE;
+       if (view->recorder) {
+               int mmf_ret = RECORDER_ERROR_NONE;
 
-        recorder_state_e state_now;
-        mmf_ret = recorder_get_state(view->recorder, &state_now);
+               recorder_state_e state_now;
+               mmf_ret = recorder_get_state(view->recorder, &state_now);
 
-        if (mmf_ret != RECORDER_ERROR_NONE) {
-            VR_DEBUG("recorder_get_state Error : %x\n", mmf_ret);
+               if (mmf_ret != RECORDER_ERROR_NONE) {
+                       VR_DEBUG("recorder_get_state Error : %x\n", mmf_ret);
 
-            LOGD("recorder_get_state failed, Recorder can't be paused");
-            return; /* can not pause ! keep old state. */
-        }
+                       LOGD("recorder_get_state failed, Recorder can't be paused");
+                       return; /* can not pause ! keep old state. */
+               }
 
-        if (state_now == RECORDER_STATE_PAUSED) {
-            VR_DEBUG("\nrecorder already PAUSED\n");
-            LOGD("Recorder can't be paused, already pasued");
-            return; /* already pause ! keep old state. */
-        }
+               if (state_now == RECORDER_STATE_PAUSED) {
+                       VR_DEBUG("\nrecorder already PAUSED\n");
+                       LOGD("Recorder can't be paused, already pasued");
+                       return; /* already pause ! keep old state. */
+               }
 
-        LOGD("Recorder is paused");
-        recorder_pause(view->recorder);
-    }
+               LOGD("Recorder is paused");
+               recorder_pause(view->recorder);
+       }
 }
 
 static void _recorder_cancel(audio_recorder_view *view)
@@ -438,10 +442,10 @@ static void _recorder_cancel(audio_recorder_view *view)
        recorder_get_state(view->recorder, &rec_state);
 
        if (rec_state == RECORDER_STATE_PAUSED || rec_state == RECORDER_STATE_RECORDING) {
-           recorder_cancel(view->recorder);
-           elm_object_part_text_set(view->layout,"recorder_timer","00 : 00");
-           char *domain = VR_STR_DOMAIN_LOCAL;
-           elm_object_domain_translatable_part_text_set(view->layout, "recorder_title", domain, STR_RECORDER_TITLE);
+               recorder_cancel(view->recorder);
+               elm_object_part_text_set(view->layout, "recorder_timer", "00 : 00");
+               char *domain = VR_STR_DOMAIN_LOCAL;
+               elm_object_domain_translatable_part_text_set(view->layout, "recorder_title", domain, STR_RECORDER_TITLE);
        }
 }
 #endif
@@ -461,134 +465,134 @@ static void _recorder_cancel(audio_recorder_view *view)
 
 void _main_layout_add(Evas_Object *layout, ui_gadget_h ug_handle, app_control_h service)
 {
-    audio_recorder_view *view = calloc(1, sizeof(audio_recorder_view));
-    if (!view) {
-        LOGD("Error Failed to create view");
-        return;
-    }
+       audio_recorder_view *view = calloc(1, sizeof(audio_recorder_view));
+       if (!view) {
+               LOGD("Error Failed to create view");
+               return;
+       }
 
-    _audio_recorder_view_set_data(view);
-
-    view->layout = layout;
-    view->ug_handle = ug_handle;
-    view->is_recording = FALSE;
-    view->service = service;
-    view->limitsize = 0;
-    int ret = 0;
-    char *size_limit = NULL;
-    ret = app_control_get_extra_data(service, "http://tizen.org/appcontrol/data/total_size", &(size_limit));
-    if (ret != APP_CONTROL_ERROR_NONE) {
-       LOGD("Failed to get total_size information!!");
-    } else {
-       view->limitsize = atoi(size_limit);
-    }
+       _audio_recorder_view_set_data(view);
+
+       view->layout = layout;
+       view->ug_handle = ug_handle;
+       view->is_recording = FALSE;
+       view->service = service;
+       view->limitsize = 0;
+       int ret = 0;
+       char *size_limit = NULL;
+       ret = app_control_get_extra_data(service, "http://tizen.org/appcontrol/data/total_size", &(size_limit));
+       if (ret != APP_CONTROL_ERROR_NONE) {
+               LOGD("Failed to get total_size information!!");
+       } else {
+               view->limitsize = atoi(size_limit);
+       }
 
-    LOGD("Size limit = %llu", view->limitsize);
+       LOGD("Size limit = %llu", view->limitsize);
 
-    _recorder_create(view);
+       _recorder_create(view);
 
-    // set layout file
-    double scale = elm_config_scale_get();
-    if ((scale - 1.8) < 0.0001) {
-       LOGD("WVGA");
-       elm_layout_file_set(layout, "/usr/ug/res/edje/attach-panel-voicerecorder/audio_recorder.edj", "audio_recorder_wvga");
-    } else if ((scale - 2.6) < 0.0001) {
-       LOGD("HD");
-       elm_layout_file_set(layout, "/usr/ug/res/edje/attach-panel-voicerecorder/audio_recorder.edj", "audio_recorder_hd");
-    } else {
-       elm_layout_file_set(layout, "/usr/ug/res/edje/attach-panel-voicerecorder/audio_recorder.edj", "audio_recorder_hd");
-    }
+       // set layout file
+       double scale = elm_config_scale_get();
+       if ((scale - 1.8) < 0.0001) {
+               LOGD("WVGA");
+               elm_layout_file_set(layout, "/usr/ug/res/edje/attach-panel-voicerecorder/audio_recorder.edj", "audio_recorder_wvga");
+       } else if ((scale - 2.6) < 0.0001) {
+               LOGD("HD");
+               elm_layout_file_set(layout, "/usr/ug/res/edje/attach-panel-voicerecorder/audio_recorder.edj", "audio_recorder_hd");
+       } else {
+               elm_layout_file_set(layout, "/usr/ug/res/edje/attach-panel-voicerecorder/audio_recorder.edj", "audio_recorder_hd");
+       }
 
-    char *domain = VR_STR_DOMAIN_LOCAL;
-    elm_object_domain_translatable_part_text_set(view->layout, "recorder_title", domain, STR_RECORDER_TITLE);
-    Evas_Object *rec_btn = NULL;
-    rec_btn = elm_button_add(view->layout);
-    elm_button_autorepeat_set(rec_btn, EINA_TRUE);
-    evas_object_size_hint_weight_set(rec_btn,  EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-    evas_object_size_hint_align_set(rec_btn, EVAS_HINT_FILL, EVAS_HINT_FILL);
-    evas_object_color_set(rec_btn, 0, 0, 0, 0);
-    elm_object_part_content_set(view->layout,"record_icon_swallow",rec_btn);
-    evas_object_show(rec_btn);
-    view->gesture_long_tap = elm_gesture_layer_add(rec_btn);
-
-    elm_gesture_layer_cb_set(view->gesture_long_tap, ELM_GESTURE_N_LONG_TAPS, ELM_GESTURE_STATE_START, _on_start_btn_clicked_cb, view);
-    elm_gesture_layer_cb_set(view->gesture_long_tap, ELM_GESTURE_N_LONG_TAPS, ELM_GESTURE_STATE_MOVE, _on_start_btn_pressed_cb, view);
-    elm_gesture_layer_cb_set(view->gesture_long_tap, ELM_GESTURE_N_LONG_TAPS, ELM_GESTURE_STATE_END, _on_stop_btn_pressed_cb, view);
-    elm_gesture_layer_cb_set(view->gesture_long_tap, ELM_GESTURE_N_LONG_TAPS, ELM_GESTURE_STATE_ABORT, _on_stop_btn_clicked_cb, view);
-    elm_gesture_layer_attach(view->gesture_long_tap, rec_btn);
-
-    evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       char *domain = VR_STR_DOMAIN_LOCAL;
+       elm_object_domain_translatable_part_text_set(view->layout, "recorder_title", domain, STR_RECORDER_TITLE);
+       Evas_Object *rec_btn = NULL;
+       rec_btn = elm_button_add(view->layout);
+       elm_button_autorepeat_set(rec_btn, EINA_TRUE);
+       evas_object_size_hint_weight_set(rec_btn,  EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_align_set(rec_btn, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       evas_object_color_set(rec_btn, 0, 0, 0, 0);
+       elm_object_part_content_set(view->layout, "record_icon_swallow", rec_btn);
+       evas_object_show(rec_btn);
+       view->gesture_long_tap = elm_gesture_layer_add(rec_btn);
+
+       elm_gesture_layer_cb_set(view->gesture_long_tap, ELM_GESTURE_N_LONG_TAPS, ELM_GESTURE_STATE_START, _on_start_btn_clicked_cb, view);
+       elm_gesture_layer_cb_set(view->gesture_long_tap, ELM_GESTURE_N_LONG_TAPS, ELM_GESTURE_STATE_MOVE, _on_start_btn_pressed_cb, view);
+       elm_gesture_layer_cb_set(view->gesture_long_tap, ELM_GESTURE_N_LONG_TAPS, ELM_GESTURE_STATE_END, _on_stop_btn_pressed_cb, view);
+       elm_gesture_layer_cb_set(view->gesture_long_tap, ELM_GESTURE_N_LONG_TAPS, ELM_GESTURE_STATE_ABORT, _on_stop_btn_clicked_cb, view);
+       elm_gesture_layer_attach(view->gesture_long_tap, rec_btn);
+
+       evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
 }
 
 #if 0
 static void _on_recorder_audio_stream_cb(void* stream, int size, audio_sample_type_e format, int channel, unsigned int timestamp, void *user_data)
 {
-    audio_recorder_view *view = user_data;
+       audio_recorder_view *view = user_data;
 
-    if (view && view->preproc_file && !feof(view->preproc_file)) {
-        char buf[PREPROC_FILE_BUF_SIZE] = {0,};
-        int read_bytes = 0;
+       if (view && view->preproc_file && !feof(view->preproc_file)) {
+               char buf[PREPROC_FILE_BUF_SIZE] = {0,};
+               int read_bytes = 0;
 
-        while (read_bytes != size) {
-            int request_bytes = MIN(PREPROC_FILE_BUF_SIZE, size - read_bytes);
-            int read = fread(buf, sizeof(char), request_bytes, view->preproc_file);
+               while (read_bytes != size) {
+                       int request_bytes = MIN(PREPROC_FILE_BUF_SIZE, size - read_bytes);
+                       int read = fread(buf, sizeof(char), request_bytes, view->preproc_file);
 
-            if (!read) {
-                break;
-            }
+                       if (!read) {
+                               break;
+                       }
 
-            memcpy(stream + read_bytes, buf, read);
-            read_bytes += read;
-        }
-    }
+                       memcpy(stream + read_bytes, buf, read);
+                       read_bytes += read;
+               }
+       }
 }
 #endif
 
 static void _on_recording_status_cb(unsigned long long elapsed_time, unsigned long long file_size, void *user_data)
 {
-    audio_recorder_view *view =  (audio_recorder_view *)user_data;
+       audio_recorder_view *view = (audio_recorder_view *)user_data;
 
-    if (view) {
-        recorder_state_e rec_state = RECORDER_STATE_NONE;
-        recorder_get_state(view->recorder, &rec_state);
-        if (rec_state == RECORDER_STATE_PAUSED || rec_state == RECORDER_STATE_READY) {
-            return;
-        }
-
-        int min = 0;
-        int sec = 0;
-
-        if (elapsed_time >= 60000) {
-            min = elapsed_time/60000;
-            sec = elapsed_time % 60000;
-            sec = sec/1000;
-        } else {
-            min = 0;
-            sec = elapsed_time/1000;
-        }
-
-        //LOGD("elapsed time is %d",elapsed_time);
-        char timer_string[MAX_LABEL_LEN] = { '\0' };
-
-        if (elapsed_time > 0) {
-            snprintf(timer_string, MAX_LABEL_LEN, "%02d : %02d", min,sec);
-        }
-
-        elm_object_part_text_set(view->layout,"recorder_timer",timer_string);
-        evas_object_show(view->layout);
-    }
+       if (view) {
+               recorder_state_e rec_state = RECORDER_STATE_NONE;
+               recorder_get_state(view->recorder, &rec_state);
+               if (rec_state == RECORDER_STATE_PAUSED || rec_state == RECORDER_STATE_READY) {
+                       return;
+               }
+
+               int min = 0;
+               int sec = 0;
+
+               if (elapsed_time >= 60000) {
+                       min = elapsed_time / 60000;
+                       sec = elapsed_time % 60000;
+                       sec = sec / 1000;
+               } else {
+                       min = 0;
+                       sec = elapsed_time / 1000;
+               }
+
+               //LOGD("elapsed time is %d",elapsed_time);
+               char timer_string[MAX_LABEL_LEN] = { '\0' };
+
+               if (elapsed_time > 0) {
+                       snprintf(timer_string, MAX_LABEL_LEN, "%02d : %02d", min, sec);
+               }
+
+               elm_object_part_text_set(view->layout, "recorder_timer", timer_string);
+               evas_object_show(view->layout);
+       }
 }
 
 static void _on_recording_limit_reached_cb(recorder_recording_limit_type_e type, void *user_data)
 {
-    audio_recorder_view *view = (audio_recorder_view *)user_data;
-    if (view) {
-        if (type == RECORDER_RECORDING_LIMIT_TIME) {
-            _recorder_stop(view);
-        } else if (type == RECORDER_RECORDING_LIMIT_SIZE) {
-            _recorder_stop(view);
-        }
-    }
+       audio_recorder_view *view = (audio_recorder_view *)user_data;
+       if (view) {
+               if (type == RECORDER_RECORDING_LIMIT_TIME) {
+                       _recorder_stop(view);
+               } else if (type == RECORDER_RECORDING_LIMIT_SIZE) {
+                       _recorder_stop(view);
+               }
+       }
 }
 
 /*static void _on_main_layout_del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)