From: DoHyun Pyun Date: Fri, 2 Sep 2016 02:37:46 +0000 (+0900) Subject: Fix UTC / ITC fail issues X-Git-Tag: accepted/tizen/common/20160902.062012^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c5bd6393fded8aa4ea2953c403e2265da707387a;p=platform%2Fcore%2Fapi%2Fbluetooth.git Fix UTC / ITC fail issues Modify the audio supported check logic Change-Id: I9cb17f2a267b11c4307cebc0d27366c296c42a74 Signed-off-by: DoHyun Pyun --- diff --git a/include/bluetooth_private.h b/include/bluetooth_private.h index 8ce9e5e..1ed5df5 100644 --- a/include/bluetooth_private.h +++ b/include/bluetooth_private.h @@ -621,6 +621,30 @@ do { \ } \ } while (0) +#define BT_CHECK_SUPPORTED_FEATURES(feature_name1, feature_name2) \ +do { \ + bool is_supported = false; \ + if (!system_info_get_platform_bool(feature_name1, &is_supported)) { \ + if (is_supported == true) { \ + LOGE("[%s] SUPPORTED", __FUNCTION__); \ + break; \ + } \ + } else { \ + LOGE("[%s] Fail to get the system feature: [%s]", __FUNCTION__, feature_name1); \ + } \ + if (!system_info_get_platform_bool(feature_name2, &is_supported)) { \ + if (is_supported == true) { \ + LOGE("[%s] SUPPORTED", __FUNCTION__); \ + break; \ + } else {\ + LOGE("[%s] NOT_SUPPORTED(0x%08x)", __FUNCTION__, BT_ERROR_NOT_SUPPORTED); \ + return BT_ERROR_NOT_SUPPORTED; \ + } \ + } else { \ + LOGE("[%s] Fail to get the system feature: [%s]", __FUNCTION__, feature_name2); \ + } \ +} while (0) + /** * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE * @brief Enumerations of the authentication event types. diff --git a/src/bluetooth-audio.c b/src/bluetooth-audio.c index 7feebe6..a7a2850 100644 --- a/src/bluetooth-audio.c +++ b/src/bluetooth-audio.c @@ -39,9 +39,8 @@ static bool is_audio_ag_initialized = false; #define BT_CHECK_AUDIO_SUPPORT() \ { \ BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON); \ - BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_AUDIO_CALL); \ - BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_AUDIO_MEDIA); \ -} + BT_CHECK_SUPPORTED_FEATURES(BT_FEATURE_AUDIO_CALL, BT_FEATURE_AUDIO_MEDIA); \ + } #define BT_CHECK_HFP_SUPPORT() \ { \