#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#"
{
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;