fix svace issue 68/65668/1 accepted/tizen/common/20160412.131056 accepted/tizen/ivi/20160413.082629 accepted/tizen/mobile/20160413.073057 accepted/tizen/tv/20160413.075412 accepted/tizen/wearable/20160413.080408 submit/tizen/20160412.060148
authorKyeonghun Lee <kh9090.lee@samsung.com>
Tue, 12 Apr 2016 05:43:20 +0000 (14:43 +0900)
committerKyeonghun Lee <kh9090.lee@samsung.com>
Tue, 12 Apr 2016 05:43:20 +0000 (14:43 +0900)
Change-Id: Id44c0c21af71857ee6925a643226eb9a166cbed7
Signed-off-by: Kyeonghun Lee <kh9090.lee@samsung.com>
include/externals/MsgNotificationWrapper.h
manager/src/msg-manager-notification.cpp
manager/src/msg-manager-util.cpp

index 2306f0f..b4e7919 100755 (executable)
 
 #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,
 
index a51d35d..b9c5a03 100644 (file)
@@ -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
index 26b7ef6..c9398ee 100644 (file)
@@ -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.");