#include "callmgr-vconf.h"
#include "callmgr-log.h"
-#define CONTACTS_PKG "org.tizen.contacts"
-#define DIALER_PKG "org.tizen.phone"
-#define CLOUD_PKG "/usr/bin/cloud-pdm-server"
-
#define NOTIFY_MISSED_CALL_ICON tzplatform_mkpath(TZ_SYS_RO_APP, "org.tizen.quickpanel/shared/res/noti_icons/Contact/noti_contact_default.png")
#define NOTIFY_MISSED_CALL_IND_ICON tzplatform_mkpath(TZ_SYS_RO_APP, "org.tizen.quickpanel/shared/res/noti_icons/Lock screen/noti_missed_call.png")
#define NOTIFY_MISSED_CALL_ICON_SUB tzplatform_mkpath(TZ_SYS_RO_APP, "org.tizen.quickpanel/shared/res/noti_icons/Contact/noti_icon_missed.png")
{
bool bbadge_exist = FALSE;
badge_error_e err = BADGE_ERROR_NONE;
+ const char w_badge[] = "org.tizen.w-phone,/usr/bin/cloud-pdm-server,org.tizen.w-contacts";
+ const char m_badge[] = "org.tizen.phone,/usr/bin/cloud-pdm-server,org.tizen.contacts";
+ char *profile = NULL, *phone_pkg_name = NULL;
dbg("__callmgr_ct_update_dialer_badge: missed_cnt(%d)", missed_cnt);
- err = badge_is_existing(DIALER_PKG, &bbadge_exist);
+ /* To support wearable Call UI also since Tizen 4.0 version, should get pkg name base on profile */
+ _callmgr_util_get_profile(&profile);
+ if (!profile) {
+ err("profile is NULL");
+ return;
+ }
+
+ _callmgr_util_get_pkg_name(CM_UTIL_PKG_ID_PHONE, &phone_pkg_name);
+ if (!phone_pkg_name) {
+ err("pkg_name is NULL");
+ g_free(profile);
+ return;
+ }
+
+ err = badge_is_existing(phone_pkg_name, &bbadge_exist);
if (err == BADGE_ERROR_NONE && bbadge_exist == FALSE) {
- err = badge_create(DIALER_PKG, DIALER_PKG","CLOUD_PKG","CONTACTS_PKG);
+ if (!g_strcmp0(profile, "wearable"))
+ err = badge_create(phone_pkg_name, w_badge);
+ else
+ err = badge_create(phone_pkg_name, m_badge);
+
if (err != BADGE_ERROR_NONE) {
err("badge_create failed: err(%d)", err);
+ g_free(profile);
+ g_free(phone_pkg_name);
return;
}
}
- badge_set_count(DIALER_PKG, missed_cnt);
+ badge_set_count(phone_pkg_name, missed_cnt);
+
+ g_free(profile);
+ g_free(phone_pkg_name);
+
}
static int __callmgr_ct_get_missed_call_count(void)