Resolve Voice Recorder loading problem 31/60031/1 accepted/tizen/mobile/20160223.001058 submit/tizen_mobile/20160222.140902
authorsahil.ch525 <sahil.ch525@samsung.com>
Mon, 22 Feb 2016 13:48:09 +0000 (19:18 +0530)
committersahil.ch525 <sahil.ch525@samsung.com>
Mon, 22 Feb 2016 13:48:09 +0000 (19:18 +0530)
Change-Id: I11713ddafb16240d3618b8e4c8d55073d434ea33
Signed-off-by: sahil.ch525 <sahil.ch525@samsung.com>
CMakeLists.txt
packaging/attach-panel-voicerecorder.spec
src/view/audio-recorder-view.c

index bcb54f3..84ac013 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(attach-panel-voicerecorder C)
+PROJECT(ug-attach-panel-voicerecorder C)
 
 IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
        SET(CMAKE_BUILD_TYPE "Release")
@@ -58,7 +58,6 @@ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fvisibility=hidden")
 SET(CMAKE_C_FLAGS_DEBUG "-O0 -g -fpie")
 SET(CMAKE_C_FLAGS_RELEASE "-O2 -fpie")
 SET(CMAKE_LDFLAGS "-Wl,-zdefs" )
-SET(voicerecorder_UG_PROJECT_NAME attach-panel-voicerecorder)
 
 ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
 
@@ -93,11 +92,9 @@ INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIBDIR})
 
 INSTALL(FILES ${CMAKE_BINARY_DIR}/audio_recorder.edj DESTINATION ${RESDIR}/edje/${PROJECT_NAME}/)
 
-INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/res/images/ DESTINATION ${RESDIR}/images/${PROJECT_NAME}/)
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/res/images/ DESTINATION ${RESDIR}/images/attach-panel-voicerecorder)
 
-
-#INSTALL(FILES ${PROJECT_NAME}.xml DESTINATION /usr/share/packages)
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/${PROJECT_NAME}.xml DESTINATION ${TZ_SYS_RO_PACKAGES}/)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/attach-panel-voicerecorder.xml DESTINATION ${TZ_SYS_RO_PACKAGES}/)
 
 # i18n
 ADD_SUBDIRECTORY(res/po)
index 57fbcf7..e56b404 100644 (file)
@@ -27,7 +27,7 @@ BuildRequires: pkgconfig(capi-content-media-content)
 BuildRequires: pkgconfig(libtzplatform-config)
 
 %description
-Description: voicerecorder UG
+Description: attach-panel-voicerecorder UG
 
 %prep
 %setup -q
@@ -61,14 +61,14 @@ cp LICENSE %{buildroot}%{_app_license_dir}/attach-panel-voicerecorder
 
 %post
 mkdir -p /usr/ug/bin/
-ln -sf %{_prefix}/bin/ug-client %{TZ_SYS_RO_UG}/bin/%{name}
+ln -sf /usr/bin/ug-client %{TZ_SYS_RO_UG}/bin/attach-panel-voicerecorder
 %postun
 
 %files
 %manifest %{name}.manifest
 %defattr(-,root,root,-)
-%{TZ_SYS_RO_UG}/lib/libattach-panel-voicerecorder.so*
-%{TZ_SYS_RO_UG}/res/edje/attach-panel-voicerecorder/*
+%{TZ_SYS_RO_UG}/lib/libug-attach-panel-voicerecorder.so*
+%{TZ_SYS_RO_UG}/res/edje/ug-attach-panel-voicerecorder/*
 %{TZ_SYS_RO_UG}/res/images/attach-panel-voicerecorder/*
 %{TZ_SYS_RO_UG}/res/locale/*
 %{TZ_SYS_RO_PACKAGES}/attach-panel-voicerecorder.xml
index 66356c7..b62bfdb 100644 (file)
@@ -42,7 +42,7 @@
 #define STR_NOTIFICATION_TEXT                  "IDS_VR_TPOP_UNABLE_TO_SAVE_RECORDING_RECORDING_TOO_SHORT"
 #define VR_STR_DOMAIN_SYS                      "sys_string"
 #define VR_STR_DOMAIN_LOCAL                    "attach-panel-voicerecorder"
-#define EDJ_FILE_NAME                          "audio_recorder.edj"
+#define EDJ_FILE_NAME                          PREFIX"/res/edje/ug-attach-panel-voicerecorder/audio_recorder.edj"
 
 static audio_recorder_view *viewhandle = NULL;
 
@@ -363,23 +363,13 @@ void _main_layout_add(Evas_Object *layout, ui_gadget_h ug_handle, app_control_h
 
        // set layout file
        double scale = elm_config_scale_get();
-       char edj_path[1024] = {0};
-       char *path = app_get_resource_path();
-       if (path == NULL) {
-               LOGD("resource path is null");
-               return;
-       }
-
-       snprintf(edj_path, 1024, "%s%s/%s", path, "edje", EDJ_FILE_NAME);
-       LOGD("edj_path path = %s", edj_path);
-       free(path);
 
        if ((scale - 1.8) < 0.0001) {
-               elm_layout_file_set(layout, edj_path, "audio_recorder_wvga");
+               elm_layout_file_set(layout,     EDJ_FILE_NAME, "audio_recorder_wvga");
        } else if ((scale - 2.6) < 0.0001) {
-               elm_layout_file_set(layout, edj_path, "audio_recorder_hd");
+               elm_layout_file_set(layout,     EDJ_FILE_NAME, "audio_recorder_hd");
        } else {
-               elm_layout_file_set(layout, edj_path, "audio_recorder_hd");
+               elm_layout_file_set(layout,     EDJ_FILE_NAME, "audio_recorder_hd");
        }
 
        char *domain = VR_STR_DOMAIN_LOCAL;