Loading system/binder/android/bluetooth/IBluetoothHeadset.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -58,4 +58,5 @@ interface IBluetoothHeadset { String number, int type); boolean setActiveDevice(in BluetoothDevice device); BluetoothDevice getActiveDevice(); boolean isInbandRingingEnabled(); } system/btif/src/btif_hf.cc +5 −19 Original line number Diff line number Diff line Loading @@ -626,17 +626,6 @@ static void bte_hf_evt(tBTA_AG_EVT event, tBTA_AG* p_data) { ASSERTC(status == BT_STATUS_SUCCESS, "context transfer failed", status); } static bool inband_ringing_property_disabled() { char disable_inband_ringing_flag[PROPERTY_VALUE_MAX] = {0}; osi_property_get("persist.bluetooth.disableinbandringing", disable_inband_ringing_flag, "false"); if (strncmp(disable_inband_ringing_flag, "true", 4) == 0) { BTIF_TRACE_DEBUG("%s: In-band ringing disabled by property", __func__); return true; } return false; } /******************************************************************************* * * Function connect Loading Loading @@ -699,7 +688,7 @@ class HeadsetInterface : Interface { return instance; } bt_status_t Init(Callbacks* callbacks, int max_hf_clients, bool inband_ringing_supported) override; bool inband_ringing_enabled) override; bt_status_t Connect(RawAddress* bd_addr) override; bt_status_t Disconnect(RawAddress* bd_addr) override; bt_status_t ConnectAudio(RawAddress* bd_addr) override; Loading Loading @@ -737,19 +726,16 @@ class HeadsetInterface : Interface { }; bt_status_t HeadsetInterface::Init(Callbacks* callbacks, int max_hf_clients, bool inband_ringing_supported) { bool inband_ringing_property_disable = inband_ringing_property_disabled(); if (inband_ringing_supported && !inband_ringing_property_disable) { bool inband_ringing_enabled) { if (inband_ringing_enabled) { btif_hf_features |= BTA_AG_FEAT_INBAND; } else { btif_hf_features &= ~BTA_AG_FEAT_INBAND; } btif_max_hf_clients = max_hf_clients; BTIF_TRACE_DEBUG( "%s: btif_hf_features=%zu, max_hf_clients=%d, " "inband_ringing=[supported=%d, enabled=%d]", __func__, btif_hf_features, btif_max_hf_clients, inband_ringing_supported, !inband_ringing_property_disable); "%s: btif_hf_features=%zu, max_hf_clients=%d, inband_ringing_enabled=%d", __func__, btif_hf_features, btif_max_hf_clients, inband_ringing_enabled); bt_hf_callbacks = callbacks; for (btif_hf_cb_t& hf_cb : btif_hf_cb) { hf_cb = {}; Loading system/include/hardware/bluetooth_headset_interface.h +2 −3 Original line number Diff line number Diff line Loading @@ -34,12 +34,11 @@ class Interface { * * @param callbacks callbacks for the user of the native stack * @param max_hf_clients maximum number of headset clients * @param inband_ringing_supported whether inband ringtone is supported by * the platform hardware * @param inband_ringing_enabled whether inband ringtone is enabled * @return BT_STATUS_SUCCESS on success */ virtual bt_status_t Init(Callbacks* callbacks, int max_hf_clients, bool inband_ringing_supported) = 0; bool inband_ringing_enabled) = 0; /** * Connect to headset Loading Loading
system/binder/android/bluetooth/IBluetoothHeadset.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -58,4 +58,5 @@ interface IBluetoothHeadset { String number, int type); boolean setActiveDevice(in BluetoothDevice device); BluetoothDevice getActiveDevice(); boolean isInbandRingingEnabled(); }
system/btif/src/btif_hf.cc +5 −19 Original line number Diff line number Diff line Loading @@ -626,17 +626,6 @@ static void bte_hf_evt(tBTA_AG_EVT event, tBTA_AG* p_data) { ASSERTC(status == BT_STATUS_SUCCESS, "context transfer failed", status); } static bool inband_ringing_property_disabled() { char disable_inband_ringing_flag[PROPERTY_VALUE_MAX] = {0}; osi_property_get("persist.bluetooth.disableinbandringing", disable_inband_ringing_flag, "false"); if (strncmp(disable_inband_ringing_flag, "true", 4) == 0) { BTIF_TRACE_DEBUG("%s: In-band ringing disabled by property", __func__); return true; } return false; } /******************************************************************************* * * Function connect Loading Loading @@ -699,7 +688,7 @@ class HeadsetInterface : Interface { return instance; } bt_status_t Init(Callbacks* callbacks, int max_hf_clients, bool inband_ringing_supported) override; bool inband_ringing_enabled) override; bt_status_t Connect(RawAddress* bd_addr) override; bt_status_t Disconnect(RawAddress* bd_addr) override; bt_status_t ConnectAudio(RawAddress* bd_addr) override; Loading Loading @@ -737,19 +726,16 @@ class HeadsetInterface : Interface { }; bt_status_t HeadsetInterface::Init(Callbacks* callbacks, int max_hf_clients, bool inband_ringing_supported) { bool inband_ringing_property_disable = inband_ringing_property_disabled(); if (inband_ringing_supported && !inband_ringing_property_disable) { bool inband_ringing_enabled) { if (inband_ringing_enabled) { btif_hf_features |= BTA_AG_FEAT_INBAND; } else { btif_hf_features &= ~BTA_AG_FEAT_INBAND; } btif_max_hf_clients = max_hf_clients; BTIF_TRACE_DEBUG( "%s: btif_hf_features=%zu, max_hf_clients=%d, " "inband_ringing=[supported=%d, enabled=%d]", __func__, btif_hf_features, btif_max_hf_clients, inband_ringing_supported, !inband_ringing_property_disable); "%s: btif_hf_features=%zu, max_hf_clients=%d, inband_ringing_enabled=%d", __func__, btif_hf_features, btif_max_hf_clients, inband_ringing_enabled); bt_hf_callbacks = callbacks; for (btif_hf_cb_t& hf_cb : btif_hf_cb) { hf_cb = {}; Loading
system/include/hardware/bluetooth_headset_interface.h +2 −3 Original line number Diff line number Diff line Loading @@ -34,12 +34,11 @@ class Interface { * * @param callbacks callbacks for the user of the native stack * @param max_hf_clients maximum number of headset clients * @param inband_ringing_supported whether inband ringtone is supported by * the platform hardware * @param inband_ringing_enabled whether inband ringtone is enabled * @return BT_STATUS_SUCCESS on success */ virtual bt_status_t Init(Callbacks* callbacks, int max_hf_clients, bool inband_ringing_supported) = 0; bool inband_ringing_enabled) = 0; /** * Connect to headset Loading