diff --git a/android/bluetooth.c b/android/bluetooth.c
index 1101b64..6d08a50 100644
--- a/android/bluetooth.c
+++ b/android/bluetooth.c
static bool start_discovery(void)
{
struct mgmt_cp_start_discovery cp;
- uint8_t type = 1 << BDADDR_BREDR;
- if (adapter.current_settings & type)
- cp.type = type;
+ if (adapter.current_settings & MGMT_SETTING_BREDR)
+ cp.type = 1 << BDADDR_BREDR;
else
cp.type = 0;
- DBG("type=0x%x", type);
+ DBG("type=0x%x", cp.type);
if (mgmt_send(mgmt_if, MGMT_OP_START_DISCOVERY, adapter.index,
sizeof(cp), &cp, NULL, NULL, NULL) > 0)
static bool stop_discovery(void)
{
struct mgmt_cp_stop_discovery cp;
- uint8_t type = 1 << BDADDR_BREDR;
- if (adapter.current_settings & type)
- cp.type = type;
+ if (adapter.current_settings & MGMT_SETTING_BREDR)
+ cp.type = 1 << BDADDR_BREDR;
else
cp.type = 0;
- DBG("type=0x%x", type);
+ DBG("type=0x%x", cp.type);
if (mgmt_send(mgmt_if, MGMT_OP_STOP_DISCOVERY, adapter.index,
sizeof(cp), &cp, NULL, NULL, NULL) > 0)