From: DoHyun Pyun Date: Fri, 19 Jun 2020 01:37:30 +0000 (+0900) Subject: Set the default visible mode to off for IOT Speaker X-Git-Tag: accepted/tizen/unified/20200701.123251~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F38%2F236638%2F2;p=platform%2Fcore%2Fconnectivity%2Fbluetooth-frwk.git Set the default visible mode to off for IOT Speaker Change-Id: I006beae3059e8117c525bea4cd0e1dde4b8ffa41 Signed-off-by: DoHyun Pyun --- diff --git a/bt-service-adaptation/services/adapter/bt-service-core-adapter.c b/bt-service-adaptation/services/adapter/bt-service-core-adapter.c index 4e5e4c3..e3f7f42 100644 --- a/bt-service-adaptation/services/adapter/bt-service-core-adapter.c +++ b/bt-service-adaptation/services/adapter/bt-service-core-adapter.c @@ -1495,7 +1495,12 @@ static gboolean __bt_adapter_post_set_enabled(gpointer user_data) BT_INFO("__bt_adapter_post_set_enabled>>"); - if (TIZEN_PROFILE_TV || !headed_plugin_info->plugin_headed_enabled) { + if (TIZEN_PROFILE_IOT && !headed_plugin_info->plugin_headed_enabled) { + /* Tizen IOT Speaker - The default visible mode is off */ + if (BLUETOOTH_ERROR_NONE != _bt_set_discoverable_mode( + BLUETOOTH_DISCOVERABLE_MODE_CONNECTABLE, 0)) + BT_ERR("Fail to set discoverable mode"); + } else if (TIZEN_PROFILE_TV || !headed_plugin_info->plugin_headed_enabled) { if (BLUETOOTH_ERROR_NONE != _bt_set_discoverable_mode( BLUETOOTH_DISCOVERABLE_MODE_GENERAL_DISCOVERABLE, 0)) BT_ERR("Fail to set discoverable mode"); diff --git a/include/bt-internal-types.h b/include/bt-internal-types.h index 4f03c05..0ae85f4 100644 --- a/include/bt-internal-types.h +++ b/include/bt-internal-types.h @@ -859,6 +859,7 @@ static inline bool get_tizen_feature_supported(char *feature) #define TIZEN_PROFILE_IVI (get_tizen_profile() == _PROFILE_IVI) #define TIZEN_PROFILE_TV (get_tizen_profile() == _PROFILE_TV) #define TIZEN_PROFILE_MOBILE (get_tizen_profile() == _PROFILE_MOBILE) +#define TIZEN_PROFILE_IOT (get_tizen_profile() == _PROFILE_IOT) #define TIZEN_FEATURE_NETWORK_TETHERING_ENABLE (get_tizen_profile() & (_PROFILE_MOBILE)) #define TIZEN_FEATURE_TELEPHONY_ENABLED (get_tizen_profile() & (_PROFILE_MOBILE))