bt_bdaddr_t bd_addr;
bt_bdname_t bd_name;
uint32_t cod;
+ bool is_incoming = !(pairing_cb.state == BT_BOND_STATE_BONDING);
int dev_type;
BTIF_TRACE_DEBUG("%s", __func__);
pairing_cb.is_ssp = true;
+ /* If JustWorks auto-accept */
+ if (p_ssp_cfm_req->just_works) {
+ /* Pairing consent for JustWorks NOT needed if:
+ * 1. Incoming temporary pairing is detected
+ */
+ if (is_incoming && pairing_cb.bond_type == BOND_TYPE_TEMPORARY) {
+ BTIF_TRACE_EVENT(
+ "%s: Auto-accept JustWorks pairing for temporary incoming", __func__);
+ btif_dm_ssp_reply(&bd_addr, BT_SSP_VARIANT_CONSENT, true, 0);
+ return;
+ }
+ }
+
cod = devclass2uint(p_ssp_cfm_req->dev_class);
if (cod == 0) {