summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
author Archie Pusaka <apusaka@google.com> 2025-03-17 04:48:58 +0000
committer Archie Pusaka <apusaka@google.com> 2025-03-18 20:32:46 -0700
commitaa4928932a228a95605dab92b5a23dcbcf7d46c4 (patch)
tree42041f5e465bf8e4009e0f35598e44571b268534 /system
parent3021ec9009e2bf2c1ee5aef3391056c333596e10 (diff)
Remove forward_get_set_report_failure_to_uhid flag
Bug: 369748430 Test: m -j Flag: EXEMPT, flag removal Change-Id: I4260c63046152360b5815ddfea82971b67387753
Diffstat (limited to 'system')
-rw-r--r--system/bta/hh/bta_hh_le.cc45
-rw-r--r--system/btif/src/btif_hh.cc4
2 files changed, 10 insertions, 39 deletions
diff --git a/system/bta/hh/bta_hh_le.cc b/system/bta/hh/bta_hh_le.cc
index 327059f379..9cbd8569ab 100644
--- a/system/bta/hh/bta_hh_le.cc
+++ b/system/bta/hh/bta_hh_le.cc
@@ -1847,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;
}
@@ -1871,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;
@@ -1924,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;
}
@@ -1969,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;
}
@@ -1987,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 {
@@ -2020,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;
}
@@ -2034,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 7288abe98c..d11a23f689 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);
}
}