Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit b5d1ea3f authored by Łukasz Rymanowski's avatar Łukasz Rymanowski
Browse files

bta_dm: Remove canceling service discovery on BTA_DmSearchCancel()

This patch removes canceling of ongoing service discovery.
It was done on BTA_DmSearchCancel() which should cancel BTA_DmSearch()
operations.
Service discovery is started with BTA_DmDiscover() and seems that
it should not be canceled unless link is disconnected.

Main problem which is fixed by this patch is following scenario

1. Device A is bonded and service discovery is started
2. Device B create bond has started and user accepted it
3. After 2), BTA_DmSearchCancel() is called to stop Inquiry and LE scan,
   however this function also stops Service Discovery started by
BTA_DmDiscover()
4. Because of 3), Device A is bonded but without any known services and
   there is no way to trigger service discovery again unless unbond and
   bonding again.

Issue can be easily reproduced with 2 Hearing Aids if bonding
has been called not from AOSP Settings but from external application which
can do it fast.
This issue might also create problems with future LeAudio devices.

test: atest -b -i -t -c BluetoothInstrumentationTests
sponsor: jpawlowski@

Reviewed-on: https://gerrit.codecoup.pl/c/aosp/platform/system/bt/+/3616


Reviewed-by: default avatarJakub Tyszkowski <jakub.tyszkowski@codecoup.pl>
Change-Id: Ie944b705d908d4b9283b99da0e36854b0b72d09e
parent 4786b942
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment