Init telephony before adding the HFP SDP record
Init telephony before adding the HFP SDP record

By patch b9d85c00108977b24ae91ea8ecedb9ceffe6f648 the initialization
of the telephony subsystem is delayed in the bluetoothd startup
procedure. As a result the SupportedFeatures bitmap has not been set
when creating the HFP SDP record. This patch changes the order of
the telephony initialization (via the state_changed function) and
the registration of the record, so that it gets the right value.

Although the corresponding bit in +BRSF is correctly set, the
missing bit for the "Three-way calling" feature in the SDP record
causes some headsets not to send AT+CHLD=? in certain situations.
This results in failed connections since BlueZ does not enter the
"connected" state on the headset interface before that command is
received, if the feature is supported by both sides.

mapfau/bluez,mapfau/bluez,silent-snowman/bluez,pstglia/external-bluetooth-bluez,pkarasev3/bluez,silent-snowman/bluez,pstglia/external-bluetooth-bluez,pstglia/external-bluetooth-bluez,pkarasev3/bluez,silent-snowman/bluez,ComputeCycles/bluez,ComputeCycles/bluez,ComputeCycles/bluez,pkarasev3/bluez,ComputeCycles/bluez,mapfau/bluez,mapfau/bluez,pkarasev3/bluez,silent-snowman/bluez,pstglia/external-bluetooth-bluez