Modify to enable bluetooth adapter for mobile device 15/37615/2 submit/tizen_mobile/20150402.062401 submit/tizen_tv/20150402.062409 submit/tizen_wearable/20150402.062413
authorseungku kim <seungku.kim@samsung.com>
Wed, 1 Apr 2015 06:28:58 +0000 (15:28 +0900)
committerPyun DoHyun <dh79.pyun@samsung.com>
Thu, 2 Apr 2015 06:22:21 +0000 (23:22 -0700)
vconf set doesn't work properly. This issue should be solved later.

Change-Id: Iea4912ba66117e873f96a690d921ddb40f809e96

bt-core/bt-core-adapter.c
bt-core/bt-core-dbus-handler.c
bt-service/bt-service-adapter.c
bt-service/bt-service-main.c
packaging/bluetooth-frwk.spec

index 211d855..364036f 100644 (file)
@@ -269,7 +269,7 @@ int _bt_enable_adapter(void)
 int _bt_disable_adapter(void)
 {
        BT_INFO_C("Disable adapter");
-#if __TIZEN_MOBILE__
+#ifdef __TIZEN_MOBILE__
        __bt_core_set_status(BT_DEACTIVATING);
 
        if (__execute_command("/usr/etc/bluetooth/bt-stack-down.sh", NULL) < 0) {
@@ -288,6 +288,8 @@ int _bt_enable_adapter_le(void)
        BT_DBG("");
 #ifdef __TIZEN_MOBILE__
        int ret;
+       bt_status_t status;
+
        status = _bt_core_get_status();
        if (status == BT_DEACTIVATED) {
                __bt_core_set_le_status(BT_LE_ACTIVATING);
@@ -314,6 +316,8 @@ int _bt_disable_adapter_le(void)
        BT_DBG("+");
 
 #ifdef __TIZEN_MOBILE__
+       bt_status_t status;
+
        status = _bt_core_get_status();
        BT_DBG("status : %d", status);
 
index 5208e71..54da4a2 100644 (file)
@@ -305,9 +305,10 @@ static DBusHandlerResult __bt_core_event_filter(DBusConnection *conn,
 
                if (strcasecmp(object_path, "/org/bluez/hci0") == 0) {
 #ifdef __TIZEN_MOBILE__
-               __bt_core_set_status(BT_DEACTIVATED);
-#endif
+                       _bt_core_adapter_removed_cb();
+#else
                        _bt_core_terminate();
+#endif
                }
        } else if (strcasecmp(member, "NameOwnerChanged") == 0) {
                char *name = NULL;
index 8a31963..561643c 100644 (file)
@@ -32,7 +32,7 @@
 #if !defined(LIBNOTIFY_SUPPORT) && !defined(LIBNOTIFICATION_SUPPORT)
 #include <syspopup_caller.h>
 #endif
-#if __TIZEN_MOBILE__
+#ifdef __TIZEN_MOBILE__
 #include <aul.h>
 #endif
 #include <notification.h>
index cbc66c9..555125a 100644 (file)
@@ -222,12 +222,12 @@ int main(void)
                BT_ERR(" Sudha 13 Fail to init event sender");
                return 0;
        }
-
+/*
        if (_bt_init_hf_local_term_event_sender() != BLUETOOTH_ERROR_NONE) {
                BT_ERR("Fail to init core event sender");
                return 0;
        }
-
+*/
        if (_bt_service_register() != BLUETOOTH_ERROR_NONE) {
                BT_ERR("Fail to register service");
                return 0;
index 19e8549..10037ba 100644 (file)
@@ -113,6 +113,10 @@ export CFLAGS+=" -fpie -DRFCOMM_DIRECT "
 export LDFLAGS+=" -Wl,--rpath=/usr/lib -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
 %endif
 
+%ifarch aarch64
+export CFLAGS="${CFLAGS} -D__TIZEN_MOBILE__ -DTIZEN_TELEPHONY_ENABLED"
+%endif
+
 %cmake . \
 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \