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
Loading
Please register or sign in to comment