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 01:38:03 +0000 (18:38 -0700)
commit1a40c96e00d762999f2c2e8be9fdd507baffc6a7
tree50f113c4aede65642b185987f6d32e8229f07d66
parent37b717c612a82f81366afee36db8853b1611b865
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: 115365334
Test: connect to both devices -> disconnect -> connect, and repeat
Change-Id: I158b19b3d1f2cb2123ec554eb1ffe8c842df998e
bta/hearing_aid/hearing_aid.cc