Set the default visible mode to off for IOT Speaker 38/236638/2
authorDoHyun Pyun <dh79.pyun@samsung.com>
Fri, 19 Jun 2020 01:37:30 +0000 (10:37 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Fri, 19 Jun 2020 04:29:47 +0000 (13:29 +0900)
Change-Id: I006beae3059e8117c525bea4cd0e1dde4b8ffa41
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
bt-service-adaptation/services/adapter/bt-service-core-adapter.c
include/bt-internal-types.h

index 4e5e4c3..e3f7f42 100644 (file)
@@ -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");
index 4f03c05..0ae85f4 100644 (file)
@@ -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))