Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9a4cf64b authored by Hui Peng's avatar Hui Peng Committed by Automerger Merge Worker
Browse files

Merge "Reland "Enforce authentication if encryption is required"" into main...

Merge "Reland "Enforce authentication if encryption is required"" into main am: 2c46e872 am: e70b725c

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2876494



Change-Id: Ia22859874b6901a80bd741b018f741ecb77fcad7
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents d2e361a0 e70b725c
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -4355,13 +4355,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;
        }
      }