OSDN Git Service

Properly route acl disconnect
authorChris Manton <cmanton@google.com>
Wed, 25 Nov 2020 16:30:05 +0000 (08:30 -0800)
committerChris Manton <cmanton@google.com>
Tue, 1 Dec 2020 18:44:06 +0000 (18:44 +0000)
Disconnect should come directly into the acl module.

Bug: 166280067
Tag: #refactor
Test: gd/cert/run --host

Change-Id: I2edaec9b29df322169b64ca1c12537af713e8c4c

stack/btu/btu_hcif.cc

index 5593f32..818418e 100644 (file)
@@ -1016,14 +1016,8 @@ static void btu_hcif_disconnection_comp_evt(uint8_t* p) {
 
   handle = HCID_GET_HANDLE(handle);
 
-  /* If L2CAP or SCO doesn't know about it, send it to ISO */
-  if (!l2c_link_hci_disc_comp(handle, reason) &&
-      !btm_sco_removed(handle, reason)) {
-    IsoManager::GetInstance()->HandleDisconnect(handle, reason);
-  }
-
-  /* Notify security manager */
-  btm_sec_disconnected(handle, static_cast<tHCI_STATUS>(reason));
+  btm_acl_disconnected(static_cast<tHCI_STATUS>(status), handle,
+                       static_cast<tHCI_STATUS>(reason));
 }
 
 /*******************************************************************************