diff options
author | 2025-03-19 16:44:10 -0700 | |
---|---|---|
committer | 2025-03-19 16:44:10 -0700 | |
commit | c62de3fc6be9e43a569f09eda405da9440163979 (patch) | |
tree | 50ad45bd93d8964f9f4a99cc1cbd9e388b5493db | |
parent | 53de957533052b233218399f5a39ae3c8be34b52 (diff) | |
parent | 3d3cb7a2afaadc3e0ecadd3fe6e78b7a3e172276 (diff) |
Snap for 13241370 from 3d3cb7a2afaadc3e0ecadd3fe6e78b7a3e172276 to 25Q2-release
Change-Id: Id1ae40ad5a43264561a83302aa40f63df8ef743e
-rw-r--r-- | flags/a2dp.aconfig | 10 | ||||
-rw-r--r-- | flags/hid.aconfig | 30 | ||||
-rw-r--r-- | flags/pairing.aconfig | 10 | ||||
-rw-r--r-- | framework/tests/bumble/src/android/bluetooth/DckScanTest.kt | 2 | ||||
-rw-r--r-- | system/bta/hh/bta_hh_le.cc | 72 | ||||
-rw-r--r-- | system/btif/src/btif_hh.cc | 4 |
6 files changed, 49 insertions, 79 deletions
diff --git a/flags/a2dp.aconfig b/flags/a2dp.aconfig index e7b9aa21b0..1fd8bbd085 100644 --- a/flags/a2dp.aconfig +++ b/flags/a2dp.aconfig @@ -115,3 +115,13 @@ flag { purpose: PURPOSE_BUGFIX } } + +flag { + name: "avdtp_prevent_double_suspend" + namespace: "bluetooth" + description: "Add state to prevent sending multiple AVDTP Suspend command in a row" + bug: "402241316" + metadata { + purpose: PURPOSE_BUGFIX + } +} diff --git a/flags/hid.aconfig b/flags/hid.aconfig index ee5728c94f..350367818b 100644 --- a/flags/hid.aconfig +++ b/flags/hid.aconfig @@ -20,16 +20,6 @@ flag { } flag { - name: "serialize_hogp_and_dis" - namespace: "bluetooth" - description: "start HOGP service discovery only after DIS discovery is finished" - bug: "367910199" - metadata { - purpose: PURPOSE_BUGFIX - } -} - -flag { name: "dont_send_hid_set_idle" namespace: "bluetooth" description: "Don't send the SET IDLE HID message" @@ -40,16 +30,6 @@ flag { } flag { - name: "forward_get_set_report_failure_to_uhid" - namespace: "bluetooth" - description: "Forward GET/SET REPORT reply to UHID even when the request fails" - bug: "369748430" - metadata { - purpose: PURPOSE_BUGFIX - } -} - -flag { name: "remove_pending_hid_connection" namespace: "bluetooth" description: "Remove the pending BTA HH connection instance when the device is removed" @@ -128,3 +108,13 @@ flag { purpose: PURPOSE_BUGFIX } } + +flag { + name: "simpler_hid_connection_policy" + namespace: "bluetooth" + description: "Simplify native HID host connection policy enforcement" + bug: "404590499" + metadata { + purpose: PURPOSE_BUGFIX + } +} diff --git a/flags/pairing.aconfig b/flags/pairing.aconfig index f30410db17..faae7d2618 100644 --- a/flags/pairing.aconfig +++ b/flags/pairing.aconfig @@ -270,3 +270,13 @@ flag { purpose: PURPOSE_BUGFIX } } + +flag { + name: "unrelated_device_smp_cancellation" + namespace: "bluetooth" + description: "Don't cancel SMP pairing if encryption fails for unrelated device" + bug: "404658828" + metadata { + purpose: PURPOSE_BUGFIX + } +} diff --git a/framework/tests/bumble/src/android/bluetooth/DckScanTest.kt b/framework/tests/bumble/src/android/bluetooth/DckScanTest.kt index 8660a4076b..845862b71a 100644 --- a/framework/tests/bumble/src/android/bluetooth/DckScanTest.kt +++ b/framework/tests/bumble/src/android/bluetooth/DckScanTest.kt @@ -32,6 +32,7 @@ import kotlinx.coroutines.flow.first import kotlinx.coroutines.runBlocking import kotlinx.coroutines.withTimeout import org.junit.Assume.assumeTrue +import org.junit.Ignore import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith @@ -99,6 +100,7 @@ class DckScanTest( } @Test + @Ignore("b/404159990") fun scanForUuid_remoteFound() { // Assume isRemoteAdvertisingWithUuid is true to skip tests in which // device is not advertising with UUID diff --git a/system/bta/hh/bta_hh_le.cc b/system/bta/hh/bta_hh_le.cc index 6dc6365562..9cbd8569ab 100644 --- a/system/bta/hh/bta_hh_le.cc +++ b/system/bta/hh/bta_hh_le.cc @@ -925,14 +925,8 @@ static void bta_hh_le_dis_cback(const RawAddress& addr, tDIS_VALUE* p_dis_value) p_cb->dscp_info.version = p_dis_value->pnp_id.product_version; } - /* TODO(b/367910199): un-serialize once multiservice HoGP is implemented */ - if (com::android::bluetooth::flags::serialize_hogp_and_dis()) { - Uuid pri_srvc = Uuid::From16Bit(UUID_SERVCLASS_LE_HID); - BTA_GATTC_ServiceSearchRequest(p_cb->conn_id, pri_srvc); - return; - } - - bta_hh_le_open_cmpl(p_cb); + Uuid pri_srvc = Uuid::From16Bit(UUID_SERVCLASS_LE_HID); + BTA_GATTC_ServiceSearchRequest(p_cb->conn_id, pri_srvc); } /******************************************************************************* @@ -950,23 +944,16 @@ static void bta_hh_le_pri_service_discovery(tBTA_HH_DEV_CB* p_cb) { p_cb->disc_active |= (BTA_HH_LE_DISC_HIDS | BTA_HH_LE_DISC_DIS); - /* read DIS info */ + /* read DIS info. If failed, continue to discover HoGP services. */ if (!DIS_ReadDISInfo(p_cb->link_spec.addrt.bda, bta_hh_le_dis_cback, DIS_ATTR_PNP_ID_BIT)) { log::error("read DIS failed"); p_cb->disc_active &= ~BTA_HH_LE_DISC_DIS; - } else { - /* TODO(b/367910199): un-serialize once multiservice HoGP is implemented */ - if (com::android::bluetooth::flags::serialize_hogp_and_dis()) { - log::debug("Waiting for DIS result before starting HoGP service discovery"); - return; - } + Uuid pri_srvc = Uuid::From16Bit(UUID_SERVCLASS_LE_HID); + BTA_GATTC_ServiceSearchRequest(p_cb->conn_id, pri_srvc); + return; } - /* in parallel */ - /* start primary service discovery for HID service */ - Uuid pri_srvc = Uuid::From16Bit(UUID_SERVCLASS_LE_HID); - BTA_GATTC_ServiceSearchRequest(p_cb->conn_id, pri_srvc); - return; + log::debug("Waiting for DIS result before starting HoGP service discovery"); } /******************************************************************************* @@ -1860,17 +1847,13 @@ static void read_report_cb(tCONN_ID conn_id, tGATT_STATUS status, uint16_t handl log::warn("Unexpected Read response, w4_evt={}", bta_hh_event_text(p_dev_cb->w4_evt)); return; } - if (com::android::bluetooth::flags::forward_get_set_report_failure_to_uhid()) { - p_dev_cb->w4_evt = BTA_HH_EMPTY_EVT; - } + p_dev_cb->w4_evt = BTA_HH_EMPTY_EVT; uint8_t hid_handle = p_dev_cb->hid_handle; const gatt::Characteristic* p_char = BTA_GATTC_GetCharacteristic(conn_id, handle); if (p_char == nullptr) { log::error("Unknown handle"); - if (com::android::bluetooth::flags::forward_get_set_report_failure_to_uhid()) { - send_read_report_reply(hid_handle, BTA_HH_ERR, nullptr); - } + send_read_report_reply(hid_handle, BTA_HH_ERR, nullptr); return; } @@ -1884,16 +1867,10 @@ static void read_report_cb(tCONN_ID conn_id, tGATT_STATUS status, uint16_t handl break; default: log::error("Unexpected Read UUID: {}", p_char->uuid.ToString()); - if (com::android::bluetooth::flags::forward_get_set_report_failure_to_uhid()) { - send_read_report_reply(hid_handle, BTA_HH_ERR, nullptr); - } + send_read_report_reply(hid_handle, BTA_HH_ERR, nullptr); return; } - if (!com::android::bluetooth::flags::forward_get_set_report_failure_to_uhid()) { - p_dev_cb->w4_evt = BTA_HH_EMPTY_EVT; - } - if (status != GATT_SUCCESS) { send_read_report_reply(hid_handle, BTA_HH_ERR, nullptr); return; @@ -1937,9 +1914,7 @@ static void bta_hh_le_get_rpt(tBTA_HH_DEV_CB* p_cb, tBTA_HH_RPT_TYPE r_type, uin if (p_rpt == nullptr) { log::error("no matching report"); - if (com::android::bluetooth::flags::forward_get_set_report_failure_to_uhid()) { - send_read_report_reply(p_cb->hid_handle, BTA_HH_ERR, nullptr); - } + send_read_report_reply(p_cb->hid_handle, BTA_HH_ERR, nullptr); return; } @@ -1982,17 +1957,13 @@ static void write_report_cb(tCONN_ID conn_id, tGATT_STATUS status, uint16_t hand } log::verbose("w4_evt:{}", bta_hh_event_text(p_dev_cb->w4_evt)); - if (com::android::bluetooth::flags::forward_get_set_report_failure_to_uhid()) { - p_dev_cb->w4_evt = BTA_HH_EMPTY_EVT; - } + p_dev_cb->w4_evt = BTA_HH_EMPTY_EVT; uint8_t hid_handle = p_dev_cb->hid_handle; const gatt::Characteristic* p_char = BTA_GATTC_GetCharacteristic(conn_id, handle); if (p_char == nullptr) { log::error("Unknown characteristic handle: {}", handle); - if (com::android::bluetooth::flags::forward_get_set_report_failure_to_uhid()) { - send_write_report_reply(hid_handle, BTA_HH_ERR, cb_evt); - } + send_write_report_reply(hid_handle, BTA_HH_ERR, cb_evt); return; } @@ -2000,17 +1971,10 @@ static void write_report_cb(tCONN_ID conn_id, tGATT_STATUS status, uint16_t hand if (uuid16 != GATT_UUID_HID_REPORT && uuid16 != GATT_UUID_HID_BT_KB_INPUT && uuid16 != GATT_UUID_HID_BT_MOUSE_INPUT && uuid16 != GATT_UUID_HID_BT_KB_OUTPUT) { log::error("Unexpected characteristic UUID: {}", p_char->uuid.ToString()); - if (com::android::bluetooth::flags::forward_get_set_report_failure_to_uhid()) { - send_write_report_reply(hid_handle, BTA_HH_ERR, cb_evt); - } + send_write_report_reply(hid_handle, BTA_HH_ERR, cb_evt); return; } - /* Set Report finished */ - if (!com::android::bluetooth::flags::forward_get_set_report_failure_to_uhid()) { - p_dev_cb->w4_evt = BTA_HH_EMPTY_EVT; - } - if (status == GATT_SUCCESS) { send_write_report_reply(hid_handle, BTA_HH_OK, cb_evt); } else { @@ -2033,9 +1997,7 @@ static void bta_hh_le_write_rpt(tBTA_HH_DEV_CB* p_cb, tBTA_HH_RPT_TYPE r_type, B if (p_buf == NULL || p_buf->len == 0) { log::error("Illegal data"); - if (com::android::bluetooth::flags::forward_get_set_report_failure_to_uhid()) { - send_write_report_reply(p_cb->hid_handle, BTA_HH_ERR, w4_evt); - } + send_write_report_reply(p_cb->hid_handle, BTA_HH_ERR, w4_evt); return; } @@ -2047,9 +2009,7 @@ static void bta_hh_le_write_rpt(tBTA_HH_DEV_CB* p_cb, tBTA_HH_RPT_TYPE r_type, B p_rpt = bta_hh_le_find_rpt_by_idtype(p_cb->hid_srvc.report, p_cb->mode, r_type, rpt_id); if (p_rpt == NULL) { log::error("no matching report"); - if (com::android::bluetooth::flags::forward_get_set_report_failure_to_uhid()) { - send_write_report_reply(p_cb->hid_handle, BTA_HH_ERR, w4_evt); - } + send_write_report_reply(p_cb->hid_handle, BTA_HH_ERR, w4_evt); osi_free(p_buf); return; } diff --git a/system/btif/src/btif_hh.cc b/system/btif/src/btif_hh.cc index 36ad3d148e..28ed77113d 100644 --- a/system/btif/src/btif_hh.cc +++ b/system/btif/src/btif_hh.cc @@ -749,9 +749,7 @@ static void hh_get_rpt_handler(tBTA_HH_HSDATA& hs_data) { HAL_CBACK(bt_hh_callbacks, handshake_cb, (RawAddress*)&(p_dev->link_spec.addrt.bda), p_dev->link_spec.addrt.type, p_dev->link_spec.transport, (bthh_status_t)hs_data.status); - if (com::android::bluetooth::flags::forward_get_set_report_failure_to_uhid()) { - bta_hh_co_get_rpt_rsp(p_dev->dev_handle, (tBTA_HH_STATUS)hs_data.status, NULL, 0); - } + bta_hh_co_get_rpt_rsp(p_dev->dev_handle, (tBTA_HH_STATUS)hs_data.status, NULL, 0); } } |