{
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");
*is_callui_running = FALSE;
}
- free(profile);
+ g_free(callui_pkg_name);
return 0;
}