Loading flags/gap.aconfig +0 −10 Original line number Diff line number Diff line Loading @@ -113,16 +113,6 @@ flag { } } flag { name: "ensure_valid_adv_flag" namespace: "bluetooth" description: "Check ADV flag is valid before processing" bug: "329888460" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "ble_gatt_server_use_address_type_in_connection" namespace: "bluetooth" Loading system/stack/btm/btm_ble_gap.cc +6 −31 Original line number Diff line number Diff line Loading @@ -304,10 +304,6 @@ static bool ble_evt_type_is_scannable(uint16_t evt_type) { return evt_type & (1 << BLE_EVT_SCANNABLE_BIT); } static bool ble_evt_type_is_directed(uint16_t evt_type) { return evt_type & (1 << BLE_EVT_DIRECTED_BIT); } static bool ble_evt_type_is_scan_resp(uint16_t evt_type) { return evt_type & (1 << BLE_EVT_SCAN_RESPONSE_BIT); } Loading Loading @@ -2053,7 +2049,6 @@ static void btm_ble_update_inq_result(tINQ_DB_ENT* p_i, uint8_t addr_type, break; } } if (com::android::bluetooth::flags::ensure_valid_adv_flag()) { // Non-connectable packets may omit flags entirely, in which case nothing // should be assumed about their values (CSSv10, 1.3.1). Thus, do not // interpret the device type unless this packet has the flags set or is Loading @@ -2076,26 +2071,6 @@ static void btm_ble_update_inq_result(tINQ_DB_ENT* p_i, uint8_t addr_type, } } if (!com::android::bluetooth::flags::ensure_valid_adv_flag()) { // Non-connectable packets may omit flags entirely, in which case nothing // should be assumed about their values (CSSv10, 1.3.1). Thus, do not // interpret the device type unless this packet has the flags set or is // connectable. bool should_process_flags = has_advertising_flags || ble_evt_type_is_connectable(evt_type); if (should_process_flags && (p_cur->flag & BTM_BLE_BREDR_NOT_SPT) == 0 && !ble_evt_type_is_directed(evt_type)) { if (p_cur->ble_addr_type != BLE_ADDR_RANDOM) { log::verbose("NOT_BR_EDR support bit not set, treat device as DUMO"); p_cur->device_type |= BT_DEVICE_TYPE_DUMO; } else { log::verbose("Random address, treat device as LE only"); } } else { log::verbose("NOT_BR/EDR support bit set, treat device as LE only"); } } } void btm_ble_process_adv_addr(RawAddress& bda, tBLE_ADDR_TYPE* addr_type) { /* map address to security record */ bool match = btm_identity_addr_to_random_pseudo(&bda, addr_type, false); Loading Loading
flags/gap.aconfig +0 −10 Original line number Diff line number Diff line Loading @@ -113,16 +113,6 @@ flag { } } flag { name: "ensure_valid_adv_flag" namespace: "bluetooth" description: "Check ADV flag is valid before processing" bug: "329888460" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "ble_gatt_server_use_address_type_in_connection" namespace: "bluetooth" Loading
system/stack/btm/btm_ble_gap.cc +6 −31 Original line number Diff line number Diff line Loading @@ -304,10 +304,6 @@ static bool ble_evt_type_is_scannable(uint16_t evt_type) { return evt_type & (1 << BLE_EVT_SCANNABLE_BIT); } static bool ble_evt_type_is_directed(uint16_t evt_type) { return evt_type & (1 << BLE_EVT_DIRECTED_BIT); } static bool ble_evt_type_is_scan_resp(uint16_t evt_type) { return evt_type & (1 << BLE_EVT_SCAN_RESPONSE_BIT); } Loading Loading @@ -2053,7 +2049,6 @@ static void btm_ble_update_inq_result(tINQ_DB_ENT* p_i, uint8_t addr_type, break; } } if (com::android::bluetooth::flags::ensure_valid_adv_flag()) { // Non-connectable packets may omit flags entirely, in which case nothing // should be assumed about their values (CSSv10, 1.3.1). Thus, do not // interpret the device type unless this packet has the flags set or is Loading @@ -2076,26 +2071,6 @@ static void btm_ble_update_inq_result(tINQ_DB_ENT* p_i, uint8_t addr_type, } } if (!com::android::bluetooth::flags::ensure_valid_adv_flag()) { // Non-connectable packets may omit flags entirely, in which case nothing // should be assumed about their values (CSSv10, 1.3.1). Thus, do not // interpret the device type unless this packet has the flags set or is // connectable. bool should_process_flags = has_advertising_flags || ble_evt_type_is_connectable(evt_type); if (should_process_flags && (p_cur->flag & BTM_BLE_BREDR_NOT_SPT) == 0 && !ble_evt_type_is_directed(evt_type)) { if (p_cur->ble_addr_type != BLE_ADDR_RANDOM) { log::verbose("NOT_BR_EDR support bit not set, treat device as DUMO"); p_cur->device_type |= BT_DEVICE_TYPE_DUMO; } else { log::verbose("Random address, treat device as LE only"); } } else { log::verbose("NOT_BR/EDR support bit set, treat device as LE only"); } } } void btm_ble_process_adv_addr(RawAddress& bda, tBLE_ADDR_TYPE* addr_type) { /* map address to security record */ bool match = btm_identity_addr_to_random_pseudo(&bda, addr_type, false); Loading