diff --git a/android/bluetooth.c b/android/bluetooth.c
index 4ce3b94..45cac5f 100644
--- a/android/bluetooth.c
+++ b/android/bluetooth.c
if (missing_settings & MGMT_SETTING_SSP)
set_mode(MGMT_OP_SET_SSP, 0x01);
- if (missing_settings & MGMT_SETTING_SECURE_CONN)
- set_mode(MGMT_OP_SET_SECURE_CONN, 0x01);
-
if (missing_settings & MGMT_SETTING_BONDABLE)
set_mode(MGMT_OP_SET_BONDABLE, 0x01);
goto failed;
}
+ /* Requested mode is set now, let's enable secure connection */
+ if (missing_settings & MGMT_SETTING_SECURE_CONN)
+ set_mode(MGMT_OP_SET_SECURE_CONN, 0x01);
+
/* Set initial default name */
if (!adapter.name) {
adapter.name = g_strdup(bt_config_get_model());