get callui pkg name from _callmgr_util_get_pkg_name() 63/146763/1
authorsinikang <sinikang@samsung.com>
Wed, 30 Aug 2017 09:18:25 +0000 (18:18 +0900)
committersinikang <sinikang@samsung.com>
Wed, 30 Aug 2017 09:18:25 +0000 (18:18 +0900)
Change-Id: Ibce3de22b277aea675c54a4f3d087ab793d72a4e

common/src/callmgr-util.c
packaging/call-manager.spec

index 4e1f0a7724ce12e70a65ac31b671cfd665365631..a7bf44bb4168232005151e3d09d27256fcf83a75 100644 (file)
@@ -407,29 +407,20 @@ int _callmgr_util_is_callui_running(gboolean *is_callui_running)
 {
        bool running = FALSE;
        uid_t uid = 0;
-       char *profile = NULL;
+       char *callui_pkg_name = NULL;
 
        dbg("_callmgr_util_is_callui_running");
 
-       _callmgr_util_get_profile(&profile);
-       if (!profile) {
-               err("profile is NULL");
+       /* To support wearable Call UI also since Tizen 4.0 version, should get pkg name base on profile */
+       _callmgr_util_get_pkg_name(CM_UTIL_PKG_ID_CALL_UI, &callui_pkg_name);
+       if (!callui_pkg_name) {
+               err("callui_pkg_name is NULL");
                return 0;
        }
 
        /* To support multi-user, check it with active uid */
        __callmgr_util_get_active_uid(&uid);
-
-       /* To support wearable Call UI also since Tizen 4.0 version, should check the profile of the device */
-       if (!g_strcmp0(profile, "mobile")) {
-               running = aul_app_is_running_for_uid(CALLUI_PKG_NAME, uid);
-       } else if (!g_strcmp0(profile, "wearable")) {
-               running = aul_app_is_running_for_uid(W_CALLUI_PKG_NAME, uid);
-       } else {
-               err("call app is not supported on this profile");
-               free(profile);
-               return 0;
-       }
+       running = aul_app_is_running_for_uid(callui_pkg_name, uid);
 
        if (running) {
                dbg("call app is already running");
@@ -439,7 +430,7 @@ int _callmgr_util_is_callui_running(gboolean *is_callui_running)
                *is_callui_running = FALSE;
        }
 
-       free(profile);
+       g_free(callui_pkg_name);
        return 0;
 }
 
index 68776565af43538455ae091782f95176617c6252..31b1bd506dbdbeea976093835100ea90deeae96c 100644 (file)
@@ -1,6 +1,6 @@
 %define major 0
 %define minor 2
-%define patchlevel 29
+%define patchlevel 30
 %define ext_feature 0
 
 Name:           call-manager