From c6aed5d38072a7136a83b7c1611ea1f6c443ed17 Mon Sep 17 00:00:00 2001 From: DoHyun Pyun Date: Tue, 28 Jul 2015 13:09:45 +0900 Subject: [PATCH] Set connectable and visible mode in TV profile Change-Id: I45a8cdce9eaab4c1f6a0b16a2e35f1ae40382dae Signed-off-by: DoHyun Pyun --- bt-service/bt-service-adapter.c | 11 ++++++++--- packaging/bluetooth-frwk.spec | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/bt-service/bt-service-adapter.c b/bt-service/bt-service-adapter.c index 977b34f..c671e04 100644 --- a/bt-service/bt-service-adapter.c +++ b/bt-service/bt-service-adapter.c @@ -468,7 +468,7 @@ static void __bt_phone_name_changed_cb(keynode_t *node, void *data) } } -#ifndef TIZEN_WEARABLE +#ifdef TIZEN_MOBILE static void __bt_set_visible_mode(void) { int timeout = 0; @@ -519,10 +519,15 @@ static int __bt_set_enabled(void) return BLUETOOTH_ERROR_INTERNAL; } -#ifndef TIZEN_WEARABLE +#ifdef TIZEN_MOBILE __bt_set_visible_mode(); +#else +#ifdef TIZEN_TV + if (_bt_set_discoverable_mode( + BLUETOOTH_DISCOVERABLE_MODE_GENERAL_DISCOVERABLE, 0)!= BLUETOOTH_ERROR_NONE) + BT_ERR("Fail to set discoverable mode"); +#endif #endif - __bt_set_local_name(); /* Update Bluetooth Status to notify other modules */ diff --git a/packaging/bluetooth-frwk.spec b/packaging/bluetooth-frwk.spec index 3433c37..baf3423 100644 --- a/packaging/bluetooth-frwk.spec +++ b/packaging/bluetooth-frwk.spec @@ -114,7 +114,7 @@ export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE" %define _servicedir starter.target.wants %if "%{?profile}" == "mobile" -export CFLAGS="$CFLAGS -DTIZEN_NETWORK_TETHERING_ENABLE -DTIZEN_BT_FLIGHTMODE_ENABLED -D__TIZEN_MOBILE__ -DTIZEN_TELEPHONY_ENABLED" +export CFLAGS="$CFLAGS -DTIZEN_NETWORK_TETHERING_ENABLE -DTIZEN_BT_FLIGHTMODE_ENABLED -DTIZEN_MOBILE -DTIZEN_TELEPHONY_ENABLED" %define _servicefile packaging/bluetooth-frwk-mobile.service %define _servicedir multi-user.target.wants %endif -- 2.7.4