From: dh79pyun Date: Tue, 30 Nov 2021 05:46:35 +0000 (+0900) Subject: Change if statement order to set the visible mode X-Git-Tag: accepted/tizen/6.5/unified/20211205.214005^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=92bd6913c65fa665ffa7f763cef077c6d0bdbd22;p=platform%2Fcore%2Fconnectivity%2Fbluetooth-frwk.git Change if statement order to set the visible mode The prioriy of the model name is higer than the profile name. Change-Id: Id28d03145f433da07d9b3b7ccc33848c5f6f92a5 Signed-off-by: dh79pyun --- diff --git a/bt-service/services/adapter/bt-service-core-adapter.c b/bt-service/services/adapter/bt-service-core-adapter.c index c86616a..43f8fdd 100644 --- a/bt-service/services/adapter/bt-service-core-adapter.c +++ b/bt-service/services/adapter/bt-service-core-adapter.c @@ -1482,14 +1482,15 @@ static gboolean __bt_adapter_post_set_enabled(gpointer user_data) BT_INFO("__bt_adapter_post_set_enabled>>"); - if (TIZEN_PROFILE_IOT || TIZEN_PROFILE_COMMON) { - /* Tizen IOT Speaker - The default visible mode is off */ + if (TIZEN_PROFILE_TV || TIZEN_FEATURE_ROBOT_REFERENCE || + !headed_plugin_info->plugin_headed_enabled) { if (BLUETOOTH_ERROR_NONE != _bt_set_discoverable_mode( - BLUETOOTH_DISCOVERABLE_MODE_CONNECTABLE, 0)) + BLUETOOTH_DISCOVERABLE_MODE_GENERAL_DISCOVERABLE, 0)) BT_ERR("Fail to set discoverable mode"); - } else if (TIZEN_PROFILE_TV || !headed_plugin_info->plugin_headed_enabled) { + } else if (TIZEN_PROFILE_IOT || TIZEN_PROFILE_COMMON) { + /* Tizen IOT Speaker - The default visible mode is off */ if (BLUETOOTH_ERROR_NONE != _bt_set_discoverable_mode( - BLUETOOTH_DISCOVERABLE_MODE_GENERAL_DISCOVERABLE, 0)) + BLUETOOTH_DISCOVERABLE_MODE_CONNECTABLE, 0)) BT_ERR("Fail to set discoverable mode"); } else { __bt_set_visible_mode();