From 6dd878feb4a5f498f09dac42c66221573fa644ee Mon Sep 17 00:00:00 2001 From: Ji-hoon Lee Date: Tue, 1 Oct 2019 20:48:33 +0900 Subject: [PATCH] Add missing feature checking routine Change-Id: I87aa9391fd92352c2cbf7eb50d7775b7967745ce --- client/ma.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/client/ma.c b/client/ma.c index 217ab1a..6c98574 100644 --- a/client/ma.c +++ b/client/ma.c @@ -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; -- 2.34.1