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

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

leaudio: Prevent from infinite loop on additng to background connect

Till now, whenever GATT Open failed, the GATT client always received
GATT_ERROR status. Usually this happens only when remote device is not
in a range and it is safe to put device into background connect.

However, it could happen that GATT Client is trying to do background
connect to the device which is not properly paired GATT_Connect does not
go down to connection manager at all. In such case, GATT_ERROR status
was also used which is missleading for the GATT CLient and would endup
in infinite loop.

With this change, such situation is detected and GATT Client can take
decision to not try to connect to the remote device which is incorrectly
paired

This patch also adds additional log to BTM_BackgroundConnectAddressKnown
which helps to understand why provided address is considered as invalid
parameter

Bug: 285191013
Test: atest BluetoothInstrumentationTests
Tag: #feature
Change-Id: Idb70fb12d14042bff624130991690f0912e6741a
parent 349be0e7
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