summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyeonghun Lee <kh9090.lee@samsung.com>2016-04-12 14:43:20 +0900
committerKyeonghun Lee <kh9090.lee@samsung.com>2016-04-12 14:43:20 +0900
commit4da61ef67effeedd047c34510e8bc60fbf1c2a30 (patch)
tree064cda9d58335fa20ac10008af59309ead335776
parent9733197531bc0664f398a280f4da1e24a83676ab (diff)
downloadmsg-service-4da61ef67effeedd047c34510e8bc60fbf1c2a30.tar.gz
msg-service-4da61ef67effeedd047c34510e8bc60fbf1c2a30.tar.bz2
msg-service-4da61ef67effeedd047c34510e8bc60fbf1c2a30.zip
Change-Id: Id44c0c21af71857ee6925a643226eb9a166cbed7 Signed-off-by: Kyeonghun Lee <kh9090.lee@samsung.com>
-rwxr-xr-xinclude/externals/MsgNotificationWrapper.h8
-rw-r--r--manager/src/msg-manager-notification.cpp11
-rw-r--r--manager/src/msg-manager-util.cpp4
3 files changed, 3 insertions, 20 deletions
diff --git a/include/externals/MsgNotificationWrapper.h b/include/externals/MsgNotificationWrapper.h
index 2306f0f..b4e7919 100755
--- a/include/externals/MsgNotificationWrapper.h
+++ b/include/externals/MsgNotificationWrapper.h
@@ -60,14 +60,6 @@
#endif
-#define NOTIFICATION_PRIV_ID DEFAULT_SETTING_PATH"/notification_priv_id"
-#define VOICE_NOTI_ID_1 DEFAULT_SETTING_PATH"/voice_noti_id1"
-#define VOICE_NOTI_ID_2 DEFAULT_SETTING_PATH"/voice_noti_id2"
-#define CB_NOTI_PRIV_ID DEFAULT_SETTING_PATH"/cb_noti_priv_id"
-#define SIM_MSG_NOTI_PRIV_ID DEFAULT_SETTING_PATH"/sim_msg_noti_priv_id"
-#define MSG_SENTFAIL_NOTI_ID DEFAULT_SETTING_PATH"/sentfail_noti_id"
-#define SIM_FULL_NOTI_PRIV_ID DEFAULT_SETTING_PATH"/sim_full_noti_id"
-
enum _msg_notification_type_e {
MSG_NOTI_TYPE_ALL = 0x00,
diff --git a/manager/src/msg-manager-notification.cpp b/manager/src/msg-manager-notification.cpp
index a51d35d..b9c5a03 100644
--- a/manager/src/msg-manager-notification.cpp
+++ b/manager/src/msg-manager-notification.cpp
@@ -1568,8 +1568,6 @@ int getLatestMsgInfo(MSG_MGR_NOTI_INFO_S *noti_info, bool isForInstantMessage)
return -1;
}
-/* contacts-service is not used for gear */
-#ifndef MSG_CONTACTS_SERVICE_NOT_SUPPORTED
MSG_MGR_ADDRESS_INFO_S tmpAddressInfo;
int normalAddCnt = 0;
int index = col_cnt;
@@ -1648,7 +1646,6 @@ int getLatestMsgInfo(MSG_MGR_NOTI_INFO_S *noti_info, bool isForInstantMessage)
}
noti_info->senderCount = normalAddCnt;
-#endif /* MSG_CONTACTS_SERVICE_NOT_SUPPORTED */
msg_db_free(msg_handle, db_res);
MSG_MGR_SEC_DEBUG("sender info = [%s]", noti_info->sender);
@@ -2374,8 +2371,6 @@ void createInfoData(MSG_MGR_NOTI_INFO_S *noti_info, MSG_MGR_MESSAGE_INFO_S *msg_
noti_info->time = msg_info->displayTime;
noti_info->extra_data = msg_info->networkStatus;
-/* contacts-service is not used for gear */
-#ifndef MSG_CONTACTS_SERVICE_NOT_SUPPORTED
MSG_MGR_CONTACT_INFO_S contactInfo = {0,};
MSG_MGR_ADDRESS_INFO_S tmpAddressInfo = {0,};
if (msg_info->addressVal[0] != '\0') {
@@ -2390,7 +2385,6 @@ void createInfoData(MSG_MGR_NOTI_INFO_S *noti_info, MSG_MGR_MESSAGE_INFO_S *msg_
if (MsgMgrGetContactInfo(&tmpAddressInfo, &contactInfo) != 0) {
MSG_MGR_WARN("MsgMgrGetContactInfo() fail.");
}
-#endif /*MSG_CONTACTS_SERVICE_NOT_SUPPORTED */
if (contactInfo.firstName[0] == '\0')
snprintf(noti_info->sender, sizeof(noti_info->sender), "%s", msg_info->addressVal);
@@ -2413,11 +2407,9 @@ void createInfoData(MSG_MGR_NOTI_INFO_S *noti_info, MSG_MGR_MESSAGE_INFO_S *msg_
noti_info->layout = NOTIFICATION_LY_NOTI_EVENT_SINGLE;
noti_info->time = msg_info->displayTime;
-/* contacts-service is not used for gear */
-#ifndef MSG_CONTACTS_SERVICE_NOT_SUPPORTED
MSG_MGR_CONTACT_INFO_S contactInfo = {0,};
MSG_MGR_ADDRESS_INFO_S tmpAddressInfo = {0,};
- if (msg_info->addressVal) {
+ if (msg_info->addressVal[0] != '\0') {
snprintf(tmpAddressInfo.addressVal, MAX_ADDRESS_VAL_LEN, "%s", msg_info->addressVal);
if (_is_valid_email(msg_info->addressVal)) {
tmpAddressInfo.addressType = MSG_ADDRESS_TYPE_EMAIL;
@@ -2429,7 +2421,6 @@ void createInfoData(MSG_MGR_NOTI_INFO_S *noti_info, MSG_MGR_MESSAGE_INFO_S *msg_
if (MsgMgrGetContactInfo(&tmpAddressInfo, &contactInfo) != 0) {
MSG_MGR_WARN("MsgMgrGetContactInfo() fail.");
}
-#endif /*MSG_CONTACTS_SERVICE_NOT_SUPPORTED */
if (contactInfo.firstName[0] == '\0')
snprintf(noti_info->sender, sizeof(noti_info->sender), "%s", msg_info->addressVal);
else
diff --git a/manager/src/msg-manager-util.cpp b/manager/src/msg-manager-util.cpp
index 26b7ef6..c9398ee 100644
--- a/manager/src/msg-manager-util.cpp
+++ b/manager/src/msg-manager-util.cpp
@@ -201,12 +201,12 @@ void MsgMgrChangePmState()
if (MsgMgrCheckNotificationSettingEnable() == false)
return;
- int callStatus = 0;
+ cm_call_status_e callStatus = CM_CALL_STATUS_IDLE;
callStatus = MsgMgrGetCallStatus();
MSG_MGR_DEBUG("Call Status = %d", callStatus);
- if (callStatus > 0 && callStatus < 3) {
+ if (callStatus > CM_CALL_STATUS_IDLE && callStatus < CM_CALL_STATUS_MAX) {
MSG_MGR_DEBUG("Call is activated. Do not turn on the lcd.");
} else {
MSG_MGR_DEBUG("Call is not activated. Turn on the lcd.");