[ITC][messages][Non-ACR][Changed feature check according to the developer comments]
authorShashank Shekhar Shukla <shekhar1.s@samsung.com>
Thu, 23 Jun 2016 05:10:36 +0000 (14:10 +0900)
committerShashank Shekhar Shukla <shekhar1.s@samsung.com>
Thu, 23 Jun 2016 05:22:36 +0000 (14:22 +0900)
Change-Id: Ie1f263a1cf6d4209b9a5a052011fc2e094f71691
Signed-off-by: Shashank Shekhar Shukla <shekhar1.s@samsung.com>
src/itc/messages/ITs-messages-common.h
src/itc/messages/ITs-messages.c

index 6fc6f0e..42b8a68 100755 (executable)
@@ -38,6 +38,7 @@
 
 #define API_NAMESPACE                          "MESSAGES_ITC"
 #define TELEPHONY_FEATURE                      "http://tizen.org/feature/network.telephony.sms"
+#define TELEPHONY_FEATURE_TELEPHONY            "http://tizen.org/feature/network.telephony"
 #define TELEPHONY_FEATURE_MMS                  "http://tizen.org/feature/network.telephony.mms"
 #define MESSAGES_IMAGE_FILE            "Image.jpg"
 
@@ -88,6 +89,7 @@
 
 GMainLoop *g_loop;
 bool g_bIsTelephonyFeatureSupported;
+bool g_bIsTelephonyFeatureTelephonySupported;
 bool g_bIsTelephonyFeatureMmsSupported;
 
 char* MessagesGetError(int nRet);
index a8cb8f5..d6c63ae 100755 (executable)
@@ -1015,7 +1015,7 @@ int ITc_messages_add_message_p(void)
        const char *pMsgText = "Test Message Text 1";
        char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
        
-       g_bIsTelephonyFeatureMmsSupported = TCTCheckSystemInfoFeatureSupported(TELEPHONY_FEATURE_MMS, API_NAMESPACE);
+       g_bIsTelephonyFeatureTelephonySupported = TCTCheckSystemInfoFeatureSupported(TELEPHONY_FEATURE_TELEPHONY, API_NAMESPACE);
        
        if ( true == GetValueFromConfigFile("MESSAGES_MOBILE_NUMBER", pszValue, API_NAMESPACE) )
        {
@@ -1031,7 +1031,7 @@ int ITc_messages_add_message_p(void)
 
 
        int nRet = messages_add_address(g_pstHandleSMSMessage, pszValue, MESSAGES_RECIPIENT_TO);
-       if ( !g_bIsTelephonyFeatureMmsSupported )
+       if ( !g_bIsTelephonyFeatureTelephonySupported )
        {
                
                if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
@@ -1087,11 +1087,11 @@ int ITc_messages_set_mbox_type_p(void)
        messages_message_box_e mbox = MESSAGES_MBOX_INBOX;
 
        
-       g_bIsTelephonyFeatureMmsSupported = TCTCheckSystemInfoFeatureSupported(TELEPHONY_FEATURE_MMS, API_NAMESPACE);
-               //target API
+       g_bIsTelephonyFeatureTelephonySupported = TCTCheckSystemInfoFeatureSupported(TELEPHONY_FEATURE_TELEPHONY, API_NAMESPACE);
+       //target API
        int nRet =  messages_set_mbox_type(g_pstHandleSMSMessage,mbox);
 
-       if ( !g_bIsTelephonyFeatureMmsSupported )
+       if ( !g_bIsTelephonyFeatureTelephonySupported )
        {
                
                if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
@@ -1140,7 +1140,7 @@ int ITc_messages_set_time_p(void)
        char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
        
        
-       g_bIsTelephonyFeatureMmsSupported = TCTCheckSystemInfoFeatureSupported(TELEPHONY_FEATURE_MMS, API_NAMESPACE);
+       g_bIsTelephonyFeatureTelephonySupported = TCTCheckSystemInfoFeatureSupported(TELEPHONY_FEATURE_TELEPHONY, API_NAMESPACE);
 
        if ( true == GetValueFromConfigFile("MESSAGES_MOBILE_NUMBER", pszValue, API_NAMESPACE) )
        {
@@ -1156,7 +1156,7 @@ int ITc_messages_set_time_p(void)
 
 
        int nRet = messages_add_address(g_pstHandleSMSMessage, pszValue, MESSAGES_RECIPIENT_TO);
-       if ( !g_bIsTelephonyFeatureMmsSupported )
+       if ( !g_bIsTelephonyFeatureTelephonySupported )
        {
                
                if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
@@ -1186,4 +1186,4 @@ int ITc_messages_set_time_p(void)
 }
 
 /** @} */ //end of itc-messages
-/** @} */ //end of itc-messages-testcases
\ No newline at end of file
+/** @} */ //end of itc-messages-testcases