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

Commit 3fdf4d28 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Revert "Drop connection when atttempting to disable encryption"" into...

Merge "Revert "Drop connection when atttempting to disable encryption"" into tm-qpr-dev am: ee7c9192

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



Change-Id: I38b87e8dbd98eefe4bf333abb181ecb9adfc6427
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents eb3d52f1 ee7c9192
Loading
Loading
Loading
Loading
+0 −14
Original line number Diff line number Diff line
@@ -641,20 +641,6 @@ void btm_acl_encrypt_change(uint16_t handle, uint8_t status,
    return;
  }

  /* if we are trying to drop encryption on an encrypted connection, drop the
   * connection */
  if (p->is_encrypted && !encr_enable) {
    LOG(ERROR) << __func__
               << " attempting to decrypt encrypted connection, disconnecting. "
                  "handle: "
               << loghex(handle);

    acl_disconnect_from_handle(handle, HCI_ERR_HOST_REJECT_SECURITY,
                               "stack::btu::btu_hcif::read_drop_encryption "
                               "Connection Already Encrypted");
    return;
  }

  p->is_encrypted = encr_enable;

  /* Process Role Switch if active */