OSDN Git Service

Hearing Aid: Clean up GATT on disconnect
authorHansong Zhang <hsz@google.com>
Thu, 27 Sep 2018 05:02:38 +0000 (22:02 -0700)
committerHansong Zhang <hsz@google.com>
Fri, 28 Sep 2018 19:20:33 +0000 (12:20 -0700)
commit1746ffd2e0b7549941d7e5aaa121674e0dc92b47
tree47a78c58972c48e6464d9f3fe1e306bb9ad14b84
parent53fdcf8645f5843ac534b79c47ceb3046a239026
Hearing Aid: Clean up GATT on disconnect

When user requests Disconnect(), after disconnecting GATT,
OnGattDisconnected() never cleans up GATT queue, because the
corresponding device is already removed from HearingDevices. We need to
clean up the queue before connecting the same device again. Without the
fix, sometimes ACL is connected, but the host failed to read GATT
characteristic to open COC. Also clean up connection update status
during disconnect

Bug: 116317072
Bug: 115365334
Test: connect to both devices -> disconnect -> connect, and repeat
Change-Id: I158b19b3d1f2cb2123ec554eb1ffe8c842df998e
bta/hearing_aid/hearing_aid.cc