OSDN Git Service

Into the BG connection when the HA disconnects from remote side
authorweichinweng <weichinweng@google.com>
Wed, 8 Apr 2020 08:41:19 +0000 (16:41 +0800)
committerweichinweng <weichinweng@google.com>
Wed, 22 Apr 2020 06:05:53 +0000 (14:05 +0800)
commit645730da0a3fc477bc3d20497eb1ac4403c66e7c
tree8708cf05caa581c444eabb8449ca8a9a76b18c62
parentdc57138de5518abad8558390622fa4c31734a29c
Into the BG connection when the HA disconnects from remote side

In some cases, it will add the random address into the BG connection
after the HA device is connected via a random address. Then the
ble_bgconn will add the public address into the controller white list if
the random address has the public address. Finally, it will get a second
connection handle with the public address on the same HearingAid device.
The patch changes the behavior that when the HearingAid device
disconnects from the remote side, add the device into the BG connection.

Bug: 152517031
Test: 1.run unit test.
2.Forget/Repair HearingAid device from Bluetooth UI.
3.Disconnect/Reconnect HearingAid device from Bluetooth UI.
4.HearingAid device power off/on, check them can reconnect.

Change-Id: Id491faeaddaa32bbea0c88c7f0563d299f7f33f8
Merged-In: Id491faeaddaa32bbea0c88c7f0563d299f7f33f8
bta/hearing_aid/hearing_aid.cc