Add container handling logic
[platform/core/connectivity/bluetooth-frwk.git] / bt-service / services / bt-service-main.c
index 7ee8782..3f1d655 100644 (file)
@@ -221,7 +221,7 @@ static gboolean __bt_check_bt_service(void *data)
                }
        }
 
-       if (TIZEN_PROFILE_TV) {
+       if (TIZEN_PROFILE_TV || TIZEN_FEATURE_ROBOT_REFERENCE) {
 /*
 #if TODO_40
                if (_bt_get_enable_timer_id() == 0)
@@ -378,6 +378,11 @@ int main(void)
                return 0;
        }
 
+       if (access(CONTAINER_FILE, F_OK) == 0) {
+               BT_INFO("bt-service is not running in container");
+               return 0;
+       }
+
        memset(&sa, 0, sizeof(sa));
        sa.sa_sigaction = __bt_sigterm_handler;
        sa.sa_flags = SA_SIGINFO;