Skip to content
Snippets Groups Projects
Commit 638e4875 authored by Ted Wang's avatar Ted Wang Committed by Brian Delwiche
Browse files

Revert "Drop connection when atttempting to disable encryption"

Bug: 259631398

This reverts commit c5eee33a.

Reason for revert: Causing b/259631398. Connection will be terminated unexpectedly when connection is in the middle of role switching with the device that does not support EPR.

Test: Regression test
Change-Id: I063e31fd74a8b319439386ecde4ce1a633b6d7bf
Merged-In: I063e31fd74a8b319439386ecde4ce1a633b6d7bf
(cherry picked from commit b2156728)
parent 5f8babc9
No related branches found
No related tags found
No related merge requests found
...@@ -630,21 +630,6 @@ void btm_acl_encrypt_change(uint16_t handle, uint8_t status, ...@@ -630,21 +630,6 @@ void btm_acl_encrypt_change(uint16_t handle, uint8_t status,
return; return;
} }
/* if we are trying to drop encryption on an encrypted connection, drop the
* connection */
if (p->is_encrypted && !encr_enable) {
android_errorWriteLog(0x534e4554, "251436534");
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; p->is_encrypted = encr_enable;
/* Process Role Switch if active */ /* Process Role Switch if active */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment