#define NOTIFY_BLOCKED_CALL_ICON tzplatform_mkpath(TZ_SYS_RO_APP, "org.tizen.call-ui/res/images/noti_icon_reject_auto.png")
#define NOTIFY_BLOCKED_CALL_ICON_SUB tzplatform_mkpath(TZ_SYS_RO_APP, "org.tizen.call-ui/res/images/noti_icon_reject_auto.png")
-#define PHONE_ICON tzplatform_mkpath(TZ_SYS_RO_ICONS, "default/small/org.tizen.phone.png")
-#define INVALID_CT_INDEX -1
-
#define CALL_MISSED_TAG "CALL_MISSED"
#define CALL_REC_REJECTED_TAG "CALL_REC_REJECTED"
-#define CALL_DEFAULT_CALLER_ID "reserved:default_caller_id"
/* Call-manager only have call_id / person_id matching data.*/
/* With this person_id, callui will find other information*/
notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
app_control_h service = NULL;
gboolean b_is_single = true;
+ char *phone_pkg_name = NULL, *contact_pkg_name = NULL;
unsigned int projection[] = {
_contacts_phone_log.person_id,
warn("Fail to notification_set_text_domain");
}
+
+ /* 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_PHONE, &phone_pkg_name);
+ if (!phone_pkg_name) {
+ err("phone_pkg_name is NULL");
+ return;
+ }
+
if (APP_CONTROL_ERROR_NONE != app_control_create(&service)) {
err("Fail to app_control_create");
} else if (service == NULL) {
err("Fail to app_control_create");
} else {
dbg("Create service");
- if (app_control_set_app_id(service, DIALER_PKG) != APP_CONTROL_ERROR_NONE) {
+ if (app_control_set_app_id(service, phone_pkg_name) != APP_CONTROL_ERROR_NONE) {
err("Fail to app_control_set_app_id");
} else if (app_control_set_operation(service, APP_CONTROL_OPERATION_DEFAULT) != APP_CONTROL_ERROR_NONE) {
err("Fail to app_control_set_operation");
app_control_destroy(service);
}
+ g_free(phone_pkg_name);
g_snprintf(str_cnt, sizeof(str_cnt), "%d", missed_cnt);
info("Notification string :[%s] [%s]", str_buf, str_cnt);
}
}
- noti_err = notification_set_pkgname(noti, CONTACTS_PKG);
+ _callmgr_util_get_pkg_name(CM_UTIL_PKG_ID_CONTACTS, &contact_pkg_name);
+ if (!contact_pkg_name) {
+ err("contact_pkg_name is NULL");
+ g_free(disp_img_path);
+ return;
+ }
+
+ noti_err = notification_set_pkgname(noti, contact_pkg_name);
if (noti_err != NOTIFICATION_ERROR_NONE) {
err("Fail to notification_set_pkgname : %d", noti_err);
}
}
g_free(disp_img_path);
+ g_free(contact_pkg_name);
}
int _callmgr_ct_set_missed_call_notification(void)
int noti_flags = 0;
char *disp_img_path = NULL;
+ char *phone_pkg_name = NULL, *contact_pkg_name = NULL;
notification_h noti = NULL;
notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
return;
}
+ /* 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_PHONE, &phone_pkg_name);
+ if (!phone_pkg_name) {
+ err("phone_pkg_name is NULL");
+ return;
+ }
+
noti_err = notification_set_tag(noti, CALL_REC_REJECTED_TAG);
if (noti_err != NOTIFICATION_ERROR_NONE) {
err("Fail to notification_set_tag : %d", noti_err);
err("Fail to app_control_create");
} else {
dbg("Create service");
- if (app_control_set_app_id(service, DIALER_PKG) != APP_CONTROL_ERROR_NONE) {
+ if (app_control_set_app_id(service, phone_pkg_name) != APP_CONTROL_ERROR_NONE) {
err("Fail to app_control_set_app_id");
} else if (app_control_set_operation(service, APP_CONTROL_OPERATION_DEFAULT) != APP_CONTROL_ERROR_NONE) {
err("Fail to app_control_set_operation");
app_control_destroy(service);
}
+ g_free(phone_pkg_name);
+
noti_err = notification_set_time(noti, time(NULL));
if (noti_err != NOTIFICATION_ERROR_NONE) {
err("Fail to notification_set_time : %d", noti_err);
g_free(disp_img_path);
disp_img_path = NULL;
- noti_err = notification_set_pkgname(noti, CONTACTS_PKG);
+ _callmgr_util_get_pkg_name(CM_UTIL_PKG_ID_CONTACTS, &contact_pkg_name);
+ if (!contact_pkg_name) {
+ err("contact_pkg_name is NULL");
+ return;
+ }
+
+ noti_err = notification_set_pkgname(noti, contact_pkg_name);
if (noti_err != NOTIFICATION_ERROR_NONE) {
err("Fail to notification_set_pkgname : %d", noti_err);
}
+ g_free(contact_pkg_name);
+
noti_err = notification_insert(noti, NULL);
if (noti_err != NOTIFICATION_ERROR_NONE) {
err("Fail to notification_insert");