Loading system/btif/include/core_callbacks.h +2 −1 Original line number Original line Diff line number Diff line Loading @@ -146,7 +146,8 @@ struct CoreInterface { virtual bt_status_t toggleProfile(tBTA_SERVICE_ID service_id, virtual bt_status_t toggleProfile(tBTA_SERVICE_ID service_id, bool enable) = 0; bool enable) = 0; virtual void removeDeviceFromProfiles(const RawAddress& bd_addr) = 0; virtual void removeDeviceFromProfiles(const RawAddress& bd_addr) = 0; virtual void onLinkDown(const RawAddress& bd_addr) = 0; virtual void onLinkDown(const RawAddress& bd_addr, tBT_TRANSPORT transport) = 0; CoreInterface(EventCallbacks* eventCallbacks, CoreInterface(EventCallbacks* eventCallbacks, ConfigInterface* configInterface, CodecInterface* msbcCodec, ConfigInterface* configInterface, CodecInterface* msbcCodec, Loading system/btif/include/mock_core_callbacks.h +2 −1 Original line number Original line Diff line number Diff line Loading @@ -126,7 +126,8 @@ struct MockCoreInterface : public CoreInterface { (tBTA_SERVICE_ID service_id, bool enable), ()); (tBTA_SERVICE_ID service_id, bool enable), ()); MOCK_METHOD((void), removeDeviceFromProfiles, (const RawAddress& bd_addr), MOCK_METHOD((void), removeDeviceFromProfiles, (const RawAddress& bd_addr), ()); ()); MOCK_METHOD((void), onLinkDown, (const RawAddress& bd_addr), ()); MOCK_METHOD((void), onLinkDown, (const RawAddress& bd_addr, tBT_TRANSPORT transport), ()); }; }; } // namespace testing } // namespace testing Loading system/btif/src/bluetooth.cc +3 −1 Original line number Original line Diff line number Diff line Loading @@ -331,7 +331,9 @@ struct CoreInterfaceImpl : bluetooth::core::CoreInterface { } } } } void onLinkDown(const RawAddress& bd_addr) override { void onLinkDown(const RawAddress& bd_addr, tBT_TRANSPORT transport) override { if (transport != BT_TRANSPORT_BR_EDR) return; if (com::android::bluetooth::flags::a2dp_concurrent_source_sink()) { if (com::android::bluetooth::flags::a2dp_concurrent_source_sink()) { btif_av_acl_disconnected(bd_addr, A2dpType::kSource); btif_av_acl_disconnected(bd_addr, A2dpType::kSource); btif_av_acl_disconnected(bd_addr, A2dpType::kSink); btif_av_acl_disconnected(bd_addr, A2dpType::kSink); Loading system/btif/src/btif_dm.cc +2 −1 Original line number Original line Diff line number Diff line Loading @@ -2431,7 +2431,8 @@ void btif_dm_acl_evt(tBTA_DM_ACL_EVT event, tBTA_DM_ACL* p_data) { case BTA_DM_LINK_DOWN_EVT: { case BTA_DM_LINK_DOWN_EVT: { bd_addr = p_data->link_down.bd_addr; bd_addr = p_data->link_down.bd_addr; btm_set_bond_type_dev(p_data->link_down.bd_addr, BOND_TYPE_UNKNOWN); btm_set_bond_type_dev(p_data->link_down.bd_addr, BOND_TYPE_UNKNOWN); GetInterfaceToProfiles()->onLinkDown(bd_addr); GetInterfaceToProfiles()->onLinkDown( bd_addr, p_data->link_down.transport_link_type); bt_conn_direction_t direction; bt_conn_direction_t direction; switch (btm_get_acl_disc_reason_code()) { switch (btm_get_acl_disc_reason_code()) { Loading system/test/common/core_interface.cc +2 −1 Original line number Original line Diff line number Diff line Loading @@ -126,4 +126,5 @@ bt_status_t MockCoreInterface::toggleProfile(tBTA_SERVICE_ID /* service_id */, void MockCoreInterface::removeDeviceFromProfiles( void MockCoreInterface::removeDeviceFromProfiles( const RawAddress& /* bd_addr */){}; const RawAddress& /* bd_addr */){}; void MockCoreInterface::onLinkDown(const RawAddress& /* bd_addr */){}; void MockCoreInterface::onLinkDown(const RawAddress& /* bd_addr */, tBT_TRANSPORT /* transport */){}; Loading
system/btif/include/core_callbacks.h +2 −1 Original line number Original line Diff line number Diff line Loading @@ -146,7 +146,8 @@ struct CoreInterface { virtual bt_status_t toggleProfile(tBTA_SERVICE_ID service_id, virtual bt_status_t toggleProfile(tBTA_SERVICE_ID service_id, bool enable) = 0; bool enable) = 0; virtual void removeDeviceFromProfiles(const RawAddress& bd_addr) = 0; virtual void removeDeviceFromProfiles(const RawAddress& bd_addr) = 0; virtual void onLinkDown(const RawAddress& bd_addr) = 0; virtual void onLinkDown(const RawAddress& bd_addr, tBT_TRANSPORT transport) = 0; CoreInterface(EventCallbacks* eventCallbacks, CoreInterface(EventCallbacks* eventCallbacks, ConfigInterface* configInterface, CodecInterface* msbcCodec, ConfigInterface* configInterface, CodecInterface* msbcCodec, Loading
system/btif/include/mock_core_callbacks.h +2 −1 Original line number Original line Diff line number Diff line Loading @@ -126,7 +126,8 @@ struct MockCoreInterface : public CoreInterface { (tBTA_SERVICE_ID service_id, bool enable), ()); (tBTA_SERVICE_ID service_id, bool enable), ()); MOCK_METHOD((void), removeDeviceFromProfiles, (const RawAddress& bd_addr), MOCK_METHOD((void), removeDeviceFromProfiles, (const RawAddress& bd_addr), ()); ()); MOCK_METHOD((void), onLinkDown, (const RawAddress& bd_addr), ()); MOCK_METHOD((void), onLinkDown, (const RawAddress& bd_addr, tBT_TRANSPORT transport), ()); }; }; } // namespace testing } // namespace testing Loading
system/btif/src/bluetooth.cc +3 −1 Original line number Original line Diff line number Diff line Loading @@ -331,7 +331,9 @@ struct CoreInterfaceImpl : bluetooth::core::CoreInterface { } } } } void onLinkDown(const RawAddress& bd_addr) override { void onLinkDown(const RawAddress& bd_addr, tBT_TRANSPORT transport) override { if (transport != BT_TRANSPORT_BR_EDR) return; if (com::android::bluetooth::flags::a2dp_concurrent_source_sink()) { if (com::android::bluetooth::flags::a2dp_concurrent_source_sink()) { btif_av_acl_disconnected(bd_addr, A2dpType::kSource); btif_av_acl_disconnected(bd_addr, A2dpType::kSource); btif_av_acl_disconnected(bd_addr, A2dpType::kSink); btif_av_acl_disconnected(bd_addr, A2dpType::kSink); Loading
system/btif/src/btif_dm.cc +2 −1 Original line number Original line Diff line number Diff line Loading @@ -2431,7 +2431,8 @@ void btif_dm_acl_evt(tBTA_DM_ACL_EVT event, tBTA_DM_ACL* p_data) { case BTA_DM_LINK_DOWN_EVT: { case BTA_DM_LINK_DOWN_EVT: { bd_addr = p_data->link_down.bd_addr; bd_addr = p_data->link_down.bd_addr; btm_set_bond_type_dev(p_data->link_down.bd_addr, BOND_TYPE_UNKNOWN); btm_set_bond_type_dev(p_data->link_down.bd_addr, BOND_TYPE_UNKNOWN); GetInterfaceToProfiles()->onLinkDown(bd_addr); GetInterfaceToProfiles()->onLinkDown( bd_addr, p_data->link_down.transport_link_type); bt_conn_direction_t direction; bt_conn_direction_t direction; switch (btm_get_acl_disc_reason_code()) { switch (btm_get_acl_disc_reason_code()) { Loading
system/test/common/core_interface.cc +2 −1 Original line number Original line Diff line number Diff line Loading @@ -126,4 +126,5 @@ bt_status_t MockCoreInterface::toggleProfile(tBTA_SERVICE_ID /* service_id */, void MockCoreInterface::removeDeviceFromProfiles( void MockCoreInterface::removeDeviceFromProfiles( const RawAddress& /* bd_addr */){}; const RawAddress& /* bd_addr */){}; void MockCoreInterface::onLinkDown(const RawAddress& /* bd_addr */){}; void MockCoreInterface::onLinkDown(const RawAddress& /* bd_addr */, tBT_TRANSPORT /* transport */){};