Add to check profile when Call UI running check on incoming call 49/138649/1 accepted/tizen/4.0/unified/20170816.013222 accepted/tizen/4.0/unified/20170816.015751 accepted/tizen/4.0/unified/20170829.015923 accepted/tizen/unified/20170717.021045 submit/tizen/20170713.064625 submit/tizen/20170717.002840 submit/tizen_4.0/20170811.094300 submit/tizen_4.0/20170814.115522 submit/tizen_4.0/20170828.100004 submit/tizen_4.0_unified/20170814.115522
authorsinikang <sinikang@samsung.com>
Thu, 13 Jul 2017 05:53:11 +0000 (14:53 +0900)
committersinikang <sinikang@samsung.com>
Thu, 13 Jul 2017 05:53:11 +0000 (14:53 +0900)
 - Call UI application has a seperate package name according the profile(mobile/wearable)
   So for supporting call feature on tw2 we should use the proper package name as following profile

Change-Id: Ie1487cb09f6c49a572538dd79842cd9fff0d2c83

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

index 5e2a6d47c1038c3f6ccd1adab51574d7643a5a77..4344a7bbe08dc97a0508f5ebccea833eb6944501 100644 (file)
@@ -42,6 +42,7 @@
 #include "callmgr-contact.h"
 
 #define CALLUI_PKG_NAME "org.tizen.call-ui"
+#define W_CALLUI_PKG_NAME "org.tizen.w-call-ui"
 #define SOUND_PATH_SILENT      "silent"
 #define CALLMGR_POPUP_NAME "org.tizen.callmgr-popup"
 #define CALLMGR_CLI_SHOW_ID "*31#"
@@ -405,12 +406,31 @@ int _callmgr_util_is_callui_running(gboolean *is_callui_running)
 {
        bool running = FALSE;
        uid_t uid = 0;
+       char *profile = NULL;
 
        dbg("_callmgr_util_is_callui_running");
 
+       system_info_get_platform_string("tizen.org/feature/profile", &profile);
+       if (!profile) {
+               err("profile is NULL");
+               return 0;
+       }
+
        /* To support multi-user, check it with active uid */
        __callmgr_util_get_active_uid(&uid);
-       running = aul_app_is_running_for_uid(CALLUI_PKG_NAME, uid);
+
+       /* To support wearable Call UI also since Tizen 4.0 version, should check the profile of the device */
+       info("profile: %s", profile);
+       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");
+               return 0;
+       }
+
        if (running) {
                dbg("call app is already running");
                *is_callui_running = TRUE;
index b49d6d874444d3f4debd134952af6515f6d1d09a..1a527af68b6894d3868f8e64a467bf0b76e49bad 100644 (file)
@@ -1,6 +1,6 @@
 %define major 0
 %define minor 2
-%define patchlevel 24
+%define patchlevel 25
 %define ext_feature 0
 
 Name:           call-manager