Add missing feature checking routine 05/215105/1
authorJi-hoon Lee <dalton.lee@samsung.com>
Tue, 1 Oct 2019 11:48:33 +0000 (20:48 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Tue, 1 Oct 2019 11:56:44 +0000 (20:56 +0900)
Change-Id: I87aa9391fd92352c2cbf7eb50d7775b7967745ce

client/ma.c

index 217ab1a5e6e38e9846e88073d5b8bbd0088056ab..6c98574439861a32fa4c843c28125b919f4bc096 100644 (file)
@@ -1427,6 +1427,10 @@ int __get_assistant_info_cb(const char* app_id, const char* name,
 }
 
 int ma_assistant_info_foreach_assistants(ma_assistant_info_list_cb callback, void* user_data) {
+       if (0 != __ma_get_feature_enabled()) {
+               return MA_ERROR_NOT_SUPPORTED;
+       }
+
        int res;
        SLOG(LOG_DEBUG, TAG_MAC, "[Client DEBUG] get assistant info start");
        if (NULL != callback) {
@@ -1447,6 +1451,10 @@ int ma_assistant_info_foreach_assistants(ma_assistant_info_list_cb callback, voi
 }
 
 int ma_assistant_info_get_app_id(ma_assistant_info_h handle, char** app_id) {
+       if (0 != __ma_get_feature_enabled()) {
+               return MA_ERROR_NOT_SUPPORTED;
+       }
+
        if (NULL == handle || NULL == app_id)
                return MA_ERROR_INVALID_PARAMETER;
        assistant_info_t* info = (assistant_info_t*)handle;
@@ -1455,6 +1463,10 @@ int ma_assistant_info_get_app_id(ma_assistant_info_h handle, char** app_id) {
 }
 
 int ma_assistant_info_get_enabled_status(ma_assistant_info_h handle, bool* status) {
+       if (0 != __ma_get_feature_enabled()) {
+               return MA_ERROR_NOT_SUPPORTED;
+       }
+
        if (NULL == handle || NULL == status)
                return MA_ERROR_INVALID_PARAMETER;
 
@@ -1472,6 +1484,10 @@ int ma_assistant_info_get_enabled_status(ma_assistant_info_h handle, bool* statu
 }
 
 int ma_assistant_info_get_name(ma_assistant_info_h handle, char** name) {
+       if (0 != __ma_get_feature_enabled()) {
+               return MA_ERROR_NOT_SUPPORTED;
+       }
+
        if (NULL == handle || NULL == name)
                return MA_ERROR_INVALID_PARAMETER;
        assistant_info_t* info = (assistant_info_t*)handle;