diff --git a/system/stack/btm/btm_sec.cc b/system/stack/btm/btm_sec.cc index f5a1ff68373b87c8364eaa33729e8744f3b47da0..e3ab81394735e34959a27b5ac01dc16556d62b7b 100644 --- a/system/stack/btm/btm_sec.cc +++ b/system/stack/btm/btm_sec.cc @@ -4356,13 +4356,15 @@ tBTM_STATUS btm_sec_execute_procedure(tBTM_SEC_DEV_REC* p_dev_rec) { // Check link status of BR/EDR if (!(p_dev_rec->sec_rec.sec_flags & BTM_SEC_AUTHENTICATED)) { if (p_dev_rec->IsLocallyInitiated()) { - if (p_dev_rec->sec_rec.security_required & BTM_SEC_OUT_AUTHENTICATE) { - LOG_DEBUG("Outgoing authentication Required"); + if (p_dev_rec->sec_rec.security_required & + (BTM_SEC_OUT_AUTHENTICATE | BTM_SEC_OUT_ENCRYPT)) { + LOG_DEBUG("Outgoing authentication/encryption Required"); start_auth = true; } } else { - if (p_dev_rec->sec_rec.security_required & BTM_SEC_IN_AUTHENTICATE) { - LOG_DEBUG("Incoming authentication Required"); + if (p_dev_rec->sec_rec.security_required & + (BTM_SEC_IN_AUTHENTICATE | BTM_SEC_IN_ENCRYPT)) { + LOG_DEBUG("Incoming authentication/encryption Required"); start_auth = true; } }