Loading system/bta/av/bta_av_main.cc +4 −4 Original line number Diff line number Diff line Loading @@ -1015,11 +1015,11 @@ bool bta_av_link_role_ok(tBTA_AV_SCB* p_scb, uint8_t bits) { if (bta_av_cb.features & BTA_AV_FEAT_CENTRAL) BTM_block_role_switch_for(p_scb->PeerAddress()); tBTM_STATUS status = BTM_SwitchRole(p_scb->PeerAddress(), HCI_ROLE_CENTRAL); tBTM_STATUS status = BTM_SwitchRoleToCentral(p_scb->PeerAddress()); if (status != BTM_CMD_STARTED) { /* can not switch role on SCB - start the timer on SCB */ LOG_ERROR("%s: peer %s BTM_SwitchRole(HCI_ROLE_CENTRAL) error: %d", LOG_ERROR( "%s: peer %s BTM_SwitchRoleToCentral(HCI_ROLE_CENTRAL) error: %d", __func__, p_scb->PeerAddress().ToString().c_str(), status); } if (status != BTM_MODE_UNSUPPORTED && status != BTM_DEV_BLACKLISTED) { Loading system/bta/dm/bta_dm_act.cc +4 −4 Original line number Diff line number Diff line Loading @@ -2161,7 +2161,7 @@ static void handle_role_change(const RawAddress& bd_addr, uint8_t new_role, /* more than one connections and the AV connection is role switched * to peripheral * switch it back to central and remove the switch policy */ BTM_SwitchRole(bd_addr, HCI_ROLE_CENTRAL); BTM_SwitchRoleToCentral(bd_addr); need_policy_change = true; } else if (p_bta_dm_cfg->avoid_scatter && (new_role == HCI_ROLE_CENTRAL)) { /* if the link updated to be central include AV activities, remove Loading Loading @@ -2348,7 +2348,7 @@ static void bta_dm_check_av() { if ((p_dev->conn_state == BTA_DM_CONNECTED) && (p_dev->info & BTA_DM_DI_AV_ACTIVE)) { /* make central and take away the role switch policy */ BTM_SwitchRole(p_dev->peer_bdaddr, HCI_ROLE_CENTRAL); BTM_SwitchRoleToCentral(p_dev->peer_bdaddr); /* else either already central or can not switch for some reasons */ BTM_block_role_switch_for(p_dev->peer_bdaddr); break; Loading Loading @@ -2544,8 +2544,8 @@ static void bta_dm_adjust_roles(bool delay_role_switch) { if (bta_dm_cb.device_list.peer_device[i].pref_role != BTA_PERIPHERAL_ROLE_ONLY && !delay_role_switch) { BTM_SwitchRole(bta_dm_cb.device_list.peer_device[i].peer_bdaddr, HCI_ROLE_CENTRAL); BTM_SwitchRoleToCentral( bta_dm_cb.device_list.peer_device[i].peer_bdaddr); } else { alarm_set_on_mloop(bta_dm_cb.switch_delay_timer, BTA_DM_SWITCH_DELAY_TIMER_MS, Loading system/btif/src/btif_dm.cc +1 −7 Original line number Diff line number Diff line Loading @@ -404,17 +404,11 @@ bool check_cod_hid(const RawAddress* remote_bdaddr) { * ******************************************************************************/ bool check_sdp_bl(const RawAddress* remote_bdaddr) { uint16_t manufacturer = 0; uint8_t lmp_ver = 0; uint16_t lmp_subver = 0; bt_property_t prop_name; bt_remote_version_t info; if (remote_bdaddr == NULL) return false; /* fetch additional info about remote device used in iop query */ BTM_ReadRemoteVersion(*remote_bdaddr, &lmp_ver, &manufacturer, &lmp_subver); /* if not available yet, try fetching from config database */ BTIF_STORAGE_FILL_PROPERTY(&prop_name, BT_PROPERTY_REMOTE_VERSION_INFO, sizeof(bt_remote_version_t), &info); Loading @@ -423,7 +417,7 @@ bool check_sdp_bl(const RawAddress* remote_bdaddr) { BT_STATUS_SUCCESS) { return false; } manufacturer = info.manufacturer; uint16_t manufacturer = info.manufacturer; for (unsigned int i = 0; i < ARRAY_SIZE(sdp_blacklist); i++) { if (manufacturer == sdp_blacklist[i].manufact_id) return true; Loading system/build/Android.bp +6 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,12 @@ fluoride_defaults { static_libs: [ "libbluetooth_gd", ], target: { darwin: { // libstatslog -> libbinder doesn't build on mac enabled: false, }, }, } // Enables code coverage for a set of source files. Must be combined with Loading system/gd/Android.bp +18 −0 Original line number Diff line number Diff line Loading @@ -771,3 +771,21 @@ rust_protobuf { source_stem: "facade", host_supported: true, } rust_protobuf { name: "libbt_facade_rootservice_proto", crate_name: "bt_facade_rootservice_proto", proto: "facade/rootservice.proto", proto_flags: ["-Iexternal/protobuf/src/"], source_stem: "rootservice", host_supported: true, } rust_protobuf { name: "libbt_facade_common_proto", crate_name: "bt_facade_common_proto", proto: "facade/common.proto", proto_flags: ["-Iexternal/protobuf/src/"], source_stem: "common", host_supported: true, } Loading
system/bta/av/bta_av_main.cc +4 −4 Original line number Diff line number Diff line Loading @@ -1015,11 +1015,11 @@ bool bta_av_link_role_ok(tBTA_AV_SCB* p_scb, uint8_t bits) { if (bta_av_cb.features & BTA_AV_FEAT_CENTRAL) BTM_block_role_switch_for(p_scb->PeerAddress()); tBTM_STATUS status = BTM_SwitchRole(p_scb->PeerAddress(), HCI_ROLE_CENTRAL); tBTM_STATUS status = BTM_SwitchRoleToCentral(p_scb->PeerAddress()); if (status != BTM_CMD_STARTED) { /* can not switch role on SCB - start the timer on SCB */ LOG_ERROR("%s: peer %s BTM_SwitchRole(HCI_ROLE_CENTRAL) error: %d", LOG_ERROR( "%s: peer %s BTM_SwitchRoleToCentral(HCI_ROLE_CENTRAL) error: %d", __func__, p_scb->PeerAddress().ToString().c_str(), status); } if (status != BTM_MODE_UNSUPPORTED && status != BTM_DEV_BLACKLISTED) { Loading
system/bta/dm/bta_dm_act.cc +4 −4 Original line number Diff line number Diff line Loading @@ -2161,7 +2161,7 @@ static void handle_role_change(const RawAddress& bd_addr, uint8_t new_role, /* more than one connections and the AV connection is role switched * to peripheral * switch it back to central and remove the switch policy */ BTM_SwitchRole(bd_addr, HCI_ROLE_CENTRAL); BTM_SwitchRoleToCentral(bd_addr); need_policy_change = true; } else if (p_bta_dm_cfg->avoid_scatter && (new_role == HCI_ROLE_CENTRAL)) { /* if the link updated to be central include AV activities, remove Loading Loading @@ -2348,7 +2348,7 @@ static void bta_dm_check_av() { if ((p_dev->conn_state == BTA_DM_CONNECTED) && (p_dev->info & BTA_DM_DI_AV_ACTIVE)) { /* make central and take away the role switch policy */ BTM_SwitchRole(p_dev->peer_bdaddr, HCI_ROLE_CENTRAL); BTM_SwitchRoleToCentral(p_dev->peer_bdaddr); /* else either already central or can not switch for some reasons */ BTM_block_role_switch_for(p_dev->peer_bdaddr); break; Loading Loading @@ -2544,8 +2544,8 @@ static void bta_dm_adjust_roles(bool delay_role_switch) { if (bta_dm_cb.device_list.peer_device[i].pref_role != BTA_PERIPHERAL_ROLE_ONLY && !delay_role_switch) { BTM_SwitchRole(bta_dm_cb.device_list.peer_device[i].peer_bdaddr, HCI_ROLE_CENTRAL); BTM_SwitchRoleToCentral( bta_dm_cb.device_list.peer_device[i].peer_bdaddr); } else { alarm_set_on_mloop(bta_dm_cb.switch_delay_timer, BTA_DM_SWITCH_DELAY_TIMER_MS, Loading
system/btif/src/btif_dm.cc +1 −7 Original line number Diff line number Diff line Loading @@ -404,17 +404,11 @@ bool check_cod_hid(const RawAddress* remote_bdaddr) { * ******************************************************************************/ bool check_sdp_bl(const RawAddress* remote_bdaddr) { uint16_t manufacturer = 0; uint8_t lmp_ver = 0; uint16_t lmp_subver = 0; bt_property_t prop_name; bt_remote_version_t info; if (remote_bdaddr == NULL) return false; /* fetch additional info about remote device used in iop query */ BTM_ReadRemoteVersion(*remote_bdaddr, &lmp_ver, &manufacturer, &lmp_subver); /* if not available yet, try fetching from config database */ BTIF_STORAGE_FILL_PROPERTY(&prop_name, BT_PROPERTY_REMOTE_VERSION_INFO, sizeof(bt_remote_version_t), &info); Loading @@ -423,7 +417,7 @@ bool check_sdp_bl(const RawAddress* remote_bdaddr) { BT_STATUS_SUCCESS) { return false; } manufacturer = info.manufacturer; uint16_t manufacturer = info.manufacturer; for (unsigned int i = 0; i < ARRAY_SIZE(sdp_blacklist); i++) { if (manufacturer == sdp_blacklist[i].manufact_id) return true; Loading
system/build/Android.bp +6 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,12 @@ fluoride_defaults { static_libs: [ "libbluetooth_gd", ], target: { darwin: { // libstatslog -> libbinder doesn't build on mac enabled: false, }, }, } // Enables code coverage for a set of source files. Must be combined with Loading
system/gd/Android.bp +18 −0 Original line number Diff line number Diff line Loading @@ -771,3 +771,21 @@ rust_protobuf { source_stem: "facade", host_supported: true, } rust_protobuf { name: "libbt_facade_rootservice_proto", crate_name: "bt_facade_rootservice_proto", proto: "facade/rootservice.proto", proto_flags: ["-Iexternal/protobuf/src/"], source_stem: "rootservice", host_supported: true, } rust_protobuf { name: "libbt_facade_common_proto", crate_name: "bt_facade_common_proto", proto: "facade/common.proto", proto_flags: ["-Iexternal/protobuf/src/"], source_stem: "common", host_supported: true, }