#ifdef TIZEN_FEATURE_BT_HPS
static GDBusProxy *hps_gproxy;
#endif
+static gboolean factory_test_mode;
void _bt_core_fill_garray_from_variant(GVariant *var, GArray *param)
{
g_variant_get(parameters, "(&s&s)", &type, &arg);
ret = _bt_core_factory_test_mode(type, arg);
- g_dbus_method_invocation_return_value(invocation,
+ factory_test_mode = TRUE;
+
+ if (ret == TRUE)
+ g_dbus_method_invocation_return_value(invocation,
g_variant_new("(i)", ret));
- _bt_core_terminate();
+ else
+ _bt_core_terminate();
+
return;
} else {
ret = FALSE;
if ((g_strcmp0(name, "org.bluez") == 0) ||
(g_strcmp0(name, "org.projectx.bt") == 0)) {
BT_DBG("%s is terminated", name);
- if (_bt_check_terminating_condition() == TRUE) {
+ if (_bt_check_terminating_condition() == TRUE && factory_test_mode == FALSE) {
_bt_disable_adapter();
_bt_disable_adapter_le();
_bt_core_terminate();
return __bt_adapter_state_handle_request(TRUE);
}
-int _bt_enable_core(void)
-{
- /* TODO_40 : 4.0 merge */
- BT_INFO("Not Supported");
- return BLUETOOTH_ERROR_NOT_SUPPORT;
-}
-
int _bt_recover_adapter(void)
{
int result = BLUETOOTH_ERROR_NONE;