Fix the log displaying problem in XU3 34/86234/2 accepted/tizen/common/20160901.143334 accepted/tizen/ivi/20160901.072647 accepted/tizen/mobile/20160901.072557 accepted/tizen/tv/20160901.072610 accepted/tizen/wearable/20160901.072628 submit/tizen/20160901.003334
authorDoHyun Pyun <dh79.pyun@samsung.com>
Wed, 31 Aug 2016 07:47:02 +0000 (16:47 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Wed, 31 Aug 2016 08:24:06 +0000 (17:24 +0900)
Change-Id: I3bc1152d78f5e9337f6f964d7d75ba896655d689
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
bt-service/bt-service-adapter.c
bt-service/include/bt-service-common.h
packaging/bluetooth-frwk-tv.service
packaging/bluetooth-frwk.spec

index 3d531f6..6033fb0 100644 (file)
@@ -901,7 +901,9 @@ void _bt_handle_adapter_removed(void)
        _bt_destroy_agent(adapter_agent);
        adapter_agent = NULL;
 
+#ifndef USB_BLUETOOTH
        _bt_reliable_terminate_service(NULL);
+#endif
 
        if (eventsystem_unregister_event(status_reg_id) != ES_R_OK) {
                BT_ERR("Fail to unregister system event");
@@ -947,7 +949,9 @@ static gboolean __bt_enable_timeout_cb(gpointer user_data)
        g_variant_unref(result);
        _bt_set_disabled(BLUETOOTH_ERROR_TIMEOUT);
 
+#ifndef USB_BLUETOOTH
        _bt_terminate_service(NULL);
+#endif
 
        return FALSE;
 }
index e345cc7..2651c77 100644 (file)
@@ -48,12 +48,22 @@ extern "C" {
 #define LOG_COLOR_BLUE          "\033[36m"
 #define LOG_COLOR_PURPLE   "\033[35m"
 
+
+#ifndef TIZEN_TV
 #define BT_DBG(fmt, args...) \
         SLOGD(fmt, ##args)
 #define BT_INFO(fmt, args...) \
         SLOGI(fmt, ##args)
 #define BT_ERR(fmt, args...) \
         SLOGE(fmt, ##args)
+#else
+#define BT_DBG(fmt, args...) \
+        LOGI(fmt, ##args)
+#define BT_INFO(fmt, args...) \
+        LOGI(fmt, ##args)
+#define BT_ERR(fmt, args...) \
+        LOGE(fmt, ##args)
+#endif
 
 #define BT_INFO_C(fmt, arg...) \
        SLOGI_IF(TRUE,  LOG_COLOR_GREEN" "fmt" "LOG_COLOR_RESET, ##arg)
index 36394a7..793d274 100644 (file)
@@ -1,10 +1,11 @@
 [Unit]
 Description=Bluetooth service
-After=multi-user.target
+After=bluetooth.service
 
 [Service]
 User=owner
 Group=users
+SupplementaryGroups=priv_mediastorage priv_externalstorage
 Type=dbus
 BusName=org.projectx.bt
 SmackProcessLabel=User
@@ -13,4 +14,4 @@ KillMode=process
 Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5001/dbus/user_bus_socket
 
 [Install]
-WantedBy=starter.target
+WantedBy=multi-user.target
\ No newline at end of file
index 95befcb..1c24731 100644 (file)
@@ -125,7 +125,7 @@ export CFLAGS="$CFLAGS -DTIZEN_WEARABLE -DTIZEN_BT_FLIGHTMODE_ENABLED"
 
 %if "%{?profile}" == "tv"
 export CFLAGS="$CFLAGS -DUSB_BLUETOOTH -DTIZEN_TV -DAUTO_ACCEPT"
-%define _servicefile packaging/bluetooth-frwk-mobile.service
+%define _servicefile packaging/bluetooth-frwk-tv.service
 %define _servicedir multi-user.target.wants
 %endif