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

Skip to content
Commit d6f23e79 authored by En-Shuo Hsu's avatar En-Shuo Hsu
Browse files

floss: Add the interface to set HFP device active

It was covered by the bta_ag_svc_conn_open so we didn't need to call it
proactively.
```
    if (bta_ag_get_active_device().IsEmpty()) {
      bta_ag_api_set_active_device(p_scb->peer_addr);
    }
```

However, it's better to follow the same flow as A2DP to set the device
active first before we use it. This facilitates future work to support
multiple Bluetooth device connections. This also prevent future
regression if we decide to remove the set device in svc_conn_open.

Bug: 241816822
Tag: #floss
Test: dbus-send --system  --type=method_call --print-reply \
--dest=org.chromium.bluetooth /org/chromium/bluetooth/hci0/media \
org.chromium.bluetooth.BluetoothMedia.SetHfpActiveDevice
string:<address>

Change-Id: Ib66a83ebdffd94402ce0a9660e4447421f667116
parent 1dfdf11b
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