diff --git a/android/bluetooth.c b/android/bluetooth.c
index 6ec87c4..94bd8ba 100644
--- a/android/bluetooth.c
+++ b/android/bluetooth.c
HAL_EV_DISCOVERY_STATE_CHANGED, sizeof(cp), &cp);
}
-static void confirm_device_name(const bdaddr_t *addr, uint8_t addr_type)
+static void confirm_device_name(const bdaddr_t *addr, uint8_t addr_type,
+ bool resolve_name)
{
struct mgmt_cp_confirm_name cp;
bacpy(&cp.addr.bdaddr, addr);
cp.addr.type = addr_type;
+ if (!resolve_name)
+ cp.name_known = 1;
+
if (mgmt_reply(mgmt_if, MGMT_OP_CONFIRM_NAME, adapter.index,
sizeof(cp), &cp, NULL, NULL, NULL) == 0)
error("Failed to send confirm name request");
if (confirm) {
char addr[18];
+ bool resolve_name = true;
ba2str(bdaddr, addr);
- info("Device %s needs name confirmation.", addr);
- confirm_device_name(bdaddr, bdaddr_type);
+ info("Device %s needs name confirmation (resolve_name=%d)",
+ addr, resolve_name);
+ confirm_device_name(bdaddr, bdaddr_type, resolve_name);
}
}