It is changed that message application isn't launched in Emulator
authorSoonmin Jung <sm0415.jung@samsung.com>
Tue, 4 Sep 2012 11:14:45 +0000 (20:14 +0900)
committerSoonmin Jung <sm0415.jung@samsung.com>
Tue, 4 Sep 2012 11:14:45 +0000 (20:14 +0900)
common/CMakeLists.txt
main/message.c
packaging/org.tizen.message.spec

index 3d0c8dd..a5d617f 100755 (executable)
@@ -18,7 +18,10 @@ INCLUDE(FindPkgConfig)
 pkg_check_modules(pkgs REQUIRED
        appsvc
        bundle
-       capi-appfw-application contacts-service
+       capi-appfw-application
+       capi-media-sound-manager
+       capi-system-info
+       contacts-service
        dlog drm-client devman_haptic
        elementary ecore ecore-x ecore-input ecore-imf ecore-file eina
        glib-2.0
@@ -30,7 +33,6 @@ pkg_check_modules(pkgs REQUIRED
        utilX
        vconf
        syspopup-caller
-       capi-media-sound-manager
        status
 )
 
index 496e0e7..9846eec 100755 (executable)
@@ -19,6 +19,7 @@
 #include <ui-gadget.h>
 #include <ui-gadget-module.h>
 #include <mm_session.h>
+#include <system_info.h>
 
 #include "msg-ui-thread-main.h"
 #include "msg-ui-common-utility.h"
@@ -852,6 +853,32 @@ static void app_service(service_h service, void *data)
        bool isDefaultView = false;
 
        char *operation = NULL;
+       char *cvalue = NULL;
+       int ret = SYSTEM_INFO_ERROR_NONE;
+
+       ret = system_info_get_value_string(SYSTEM_INFO_KEY_MODEL, &cvalue);
+       if (ret == SYSTEM_INFO_ERROR_NONE && cvalue != NULL) {
+               if (g_strcmp0(cvalue, "Emulator") == 0) {
+                       D_MSG("Not support in Emulator !!");
+                       g_free(cvalue);
+
+                       service_h reply;
+
+                       int ret = service_create(&reply);
+                       if (ret != SERVICE_ERROR_NONE) {
+                               D_EMSG("service_create() is failed : ret = %d", ret);
+                       } else {
+                               service_reply_to_launch_request(reply, service, SERVICE_RESULT_CANCELED);
+                               service_destroy(reply);
+                       }
+
+                       /* Exit application because it is not supported in Emulator. */
+                       elm_exit();
+               }
+       }
+
+       if (cvalue)
+               g_free(cvalue);
 
        ug_resume();
 
index 4a04376..cd7ebe1 100755 (executable)
@@ -10,6 +10,8 @@ Requires(post): /usr/bin/vconftool
 BuildRequires:  pkgconfig(appsvc)
 BuildRequires:  pkgconfig(bundle)
 BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires:  pkgconfig(capi-media-sound-manager)
+BuildRequires:  pkgconfig(capi-system-info)
 BuildRequires:  pkgconfig(contacts-service)
 BuildRequires:  pkgconfig(dlog)
 BuildRequires:  pkgconfig(drm-client)
@@ -34,7 +36,6 @@ BuildRequires:  pkgconfig(mm-fileinfo)
 BuildRequires:  pkgconfig(utilX)
 BuildRequires:  pkgconfig(ui-gadget-1)
 BuildRequires:  pkgconfig(syspopup-caller)
-BuildRequires:  pkgconfig(capi-media-sound-manager)
 BuildRequires:  pkgconfig(status)
 BuildRequires:  libug-contacts-devel
 BuildRequires:  cmake