MSG_MGR_NOTI_INFO_S noti_info = {0, };
noti_info.type = noti_type;
- noti_info.active_noti_button_num = 1;
+ noti_info.active_noti_button_num = MSG_ACTIVE_NOTI_BUTTON_NUM_CLASS0_MESSAGE;
createActiveInfoData(¬i_info, msg_info);
MSG_MGR_DEBUG("active num [%d]", noti_info->active_noti_button_num);
- if (bFeedback && noti_info->active_noti_button_num > 0 &&
+ if (bFeedback && noti_info->active_noti_button_num > MSG_ACTIVE_NOTI_BUTTON_NUM_NONE &&
((noti_info->type >= MSG_MGR_NOTI_TYPE_NORMAL && noti_info->type <= MSG_MGR_NOTI_TYPE_SIM) || noti_info->type == MSG_MGR_NOTI_TYPE_CLASS0)) {
notification_h active_noti_h = notification_create(NOTIFICATION_TYPE_NOTI);
}
if (i == 1) {
- noti_info->active_noti_button_num = 1;
+ noti_info->active_noti_button_num = MSG_ACTIVE_NOTI_BUTTON_NUM_UNKNOWN_SENDER;
}
} else {
char *senderStr = NULL;
if (subType == MSG_CB_SMS) {
senderStr = get_translate_text(MSG_APP_PACKAGE_NAME, MSG_APP_LOCALEDIR, CB_MESSAGE);
g_strlcat(noti_info->sender, senderStr, sizeof(noti_info->sender)-strlen(noti_info->sender));
- noti_info->active_noti_button_num = 1;
+ noti_info->active_noti_button_num = MSG_ACTIVE_NOTI_BUTTON_NUM_CB_MESSAGE;
} else if (subType == MSG_SYNCML_CP) {
senderStr = get_translate_text(MSG_APP_PACKAGE_NAME, MSG_APP_LOCALEDIR, CP_MESSAGE);
g_strlcat(noti_info->sender, senderStr, sizeof(noti_info->sender)-strlen(noti_info->sender));
- noti_info->active_noti_button_num = 1;
+ noti_info->active_noti_button_num = MSG_ACTIVE_NOTI_BUTTON_NUM_PUSH_MESSAGE;
} else if (subType == MSG_WAP_SI_SMS || subType == MSG_WAP_SL_SMS) {
senderStr = get_translate_text(MSG_APP_PACKAGE_NAME, MSG_APP_LOCALEDIR, PUSH_MESSAGE);
g_strlcat(noti_info->sender, senderStr, sizeof(noti_info->sender)-strlen(noti_info->sender));
- noti_info->active_noti_button_num = 1;
+ noti_info->active_noti_button_num = MSG_ACTIVE_NOTI_BUTTON_NUM_PUSH_MESSAGE;
} else {
g_strlcat(noti_info->sender, tmpAddressInfo.addressVal, sizeof(noti_info->sender)-strlen(noti_info->sender));
}
addServiceExtraData(noti_info->svc_h, "msgId", noti_info->msg_id);
addServiceExtraData(noti_info->svc_h, "http://tizen.org/appcontrol/data/notification", "new_message");
- if (noti_info->active_noti_button_num == 0)
- noti_info->active_noti_button_num = 3;
+ if (active_noti == MSG_MGR_ACTIVE_NOTI_TYPE_ACTIVE) {
+ if (noti_info->active_noti_button_num == MSG_ACTIVE_NOTI_BUTTON_NUM_NONE)
+ noti_info->active_noti_button_num = MSG_ACTIVE_NOTI_BUTTON_NUM_NORMAL_MESSAGE;
- int activated_conv_id = -1;
- vconf_get_int(VCONFKEY_MESSAGE_ACTIVATED_CONVERSATION_ID, &activated_conv_id);
+ int activated_conv_id = -1;
+ vconf_get_int(VCONFKEY_MESSAGE_ACTIVATED_CONVERSATION_ID, &activated_conv_id);
- if (activated_conv_id == -1) {
- noti_info->applist = NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY|NOTIFICATION_DISPLAY_APP_LOCK|NOTIFICATION_DISPLAY_APP_INDICATOR;
- } else if (activated_conv_id == 0) {
- noti_info->active_noti_button_num = 0;
- noti_info->applist = NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY|NOTIFICATION_DISPLAY_APP_LOCK|NOTIFICATION_DISPLAY_APP_INDICATOR|NOTIFICATION_DISPLAY_APP_TICKER;
- } else if (activated_conv_id > 0){
- noti_info->active_noti_button_num = 0;
-
- if (activated_conv_id != noti_info->conv_id)
+ if (activated_conv_id == -1) {
+ noti_info->applist = NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY|NOTIFICATION_DISPLAY_APP_LOCK|NOTIFICATION_DISPLAY_APP_INDICATOR;
+ } else if (activated_conv_id == 0) {
+ noti_info->active_noti_button_num = MSG_ACTIVE_NOTI_BUTTON_NUM_NONE;
noti_info->applist = NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY|NOTIFICATION_DISPLAY_APP_LOCK|NOTIFICATION_DISPLAY_APP_INDICATOR|NOTIFICATION_DISPLAY_APP_TICKER;
- else
- MSG_MGR_WARN("No adding Notification : activated conv id [%d] / notification conv id [%d]", activated_conv_id, noti_info->conv_id);
+ } else if (activated_conv_id > 0){
+ noti_info->active_noti_button_num = MSG_ACTIVE_NOTI_BUTTON_NUM_NONE;
+
+ if (activated_conv_id != noti_info->conv_id)
+ noti_info->applist = NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY|NOTIFICATION_DISPLAY_APP_LOCK|NOTIFICATION_DISPLAY_APP_INDICATOR|NOTIFICATION_DISPLAY_APP_TICKER;
+ else
+ MSG_MGR_WARN("No adding Notification : activated conv id [%d] / notification conv id [%d]", activated_conv_id, noti_info->conv_id);
+ }
+ } else {
+ noti_info->applist = NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY|NOTIFICATION_DISPLAY_APP_LOCK|NOTIFICATION_DISPLAY_APP_INDICATOR;
}
break;
else
noti_info->applist = NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY|NOTIFICATION_DISPLAY_APP_INDICATOR;
- noti_info->active_noti_button_num = 1;
+ noti_info->active_noti_button_num = MSG_ACTIVE_NOTI_BUTTON_NUM_CB_MESSAGE;
break;
}
case MSG_MGR_NOTI_TYPE_SIM: {
else
noti_info->applist = NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY|NOTIFICATION_DISPLAY_APP_INDICATOR;
- if (noti_info->active_noti_button_num == 0)
- noti_info->active_noti_button_num = 3;
+ if (noti_info->active_noti_button_num == MSG_ACTIVE_NOTI_BUTTON_NUM_NONE)
+ noti_info->active_noti_button_num = MSG_ACTIVE_NOTI_BUTTON_NUM_NORMAL_MESSAGE;
break;
}
case MSG_MGR_NOTI_TYPE_FAILED: {
}
if (active_noti != MSG_MGR_ACTIVE_NOTI_TYPE_ACTIVE)
- noti_info->active_noti_button_num = 0;
+ noti_info->active_noti_button_num = MSG_ACTIVE_NOTI_BUTTON_NUM_NONE;
MSG_MGR_END();
}