Loading system/stack/hid/hidd_api.cc +0 −14 Original line number Diff line number Diff line Loading @@ -28,7 +28,6 @@ #include <string.h> #include "bt_types.h" #include "bta/include/bta_api.h" #include "btm_api.h" #include "btu.h" #include "hidd_api.h" Loading Loading @@ -91,19 +90,6 @@ tHID_STATUS HID_DevRegister(tHID_DEV_HOST_CALLBACK* host_cback) { if (host_cback == NULL) return HID_ERR_INVALID_PARAM; if (!BTM_SimpleSetSecurityLevel(BTM_SEC_SERVICE_HIDD_SEC_CTRL, BTA_SEC_AUTHENTICATE | BTA_SEC_ENCRYPT, HID_PSM_CONTROL)) { HIDD_TRACE_ERROR("Security Registration 1 failed"); return (HID_ERR_NO_RESOURCES); } if (!BTM_SimpleSetSecurityLevel(BTM_SEC_SERVICE_HIDD_INTR, BTM_SEC_NONE, HID_PSM_INTERRUPT)) { HIDD_TRACE_ERROR("Security Registration 5 failed"); return (HID_ERR_NO_RESOURCES); } /* Register with L2CAP */ st = hidd_conn_reg(); if (st != HID_SUCCESS) return st; Loading system/stack/hid/hidd_conn.cc +14 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ #include "hidd_api.h" #include "hidd_int.h" #include "bta/include/bta_api.h" #include "osi/include/osi.h" #include "stack/btm/btm_sec.h" Loading Loading @@ -758,6 +759,19 @@ tHID_STATUS hidd_conn_reg(void) { hd_cb.l2cap_intr_cfg.flush_to_present = TRUE; hd_cb.l2cap_intr_cfg.flush_to = HID_DEV_FLUSH_TO; if (!BTM_SimpleSetSecurityLevel(BTM_SEC_SERVICE_HIDD_SEC_CTRL, BTA_SEC_AUTHENTICATE | BTA_SEC_ENCRYPT, HID_PSM_CONTROL)) { HIDD_TRACE_ERROR("Security Registration 1 failed"); return (HID_ERR_NO_RESOURCES); } if (!BTM_SimpleSetSecurityLevel(BTM_SEC_SERVICE_HIDD_INTR, BTM_SEC_NONE, HID_PSM_INTERRUPT)) { HIDD_TRACE_ERROR("Security Registration 5 failed"); return (HID_ERR_NO_RESOURCES); } if (!L2CA_Register(HID_PSM_CONTROL, (tL2CAP_APPL_INFO*)&dev_reg_info, false /* enable_snoop */, nullptr, hd_cb.l2cap_cfg.mtu)) { HIDD_TRACE_ERROR("HID Control (device) registration failed"); Loading Loading
system/stack/hid/hidd_api.cc +0 −14 Original line number Diff line number Diff line Loading @@ -28,7 +28,6 @@ #include <string.h> #include "bt_types.h" #include "bta/include/bta_api.h" #include "btm_api.h" #include "btu.h" #include "hidd_api.h" Loading Loading @@ -91,19 +90,6 @@ tHID_STATUS HID_DevRegister(tHID_DEV_HOST_CALLBACK* host_cback) { if (host_cback == NULL) return HID_ERR_INVALID_PARAM; if (!BTM_SimpleSetSecurityLevel(BTM_SEC_SERVICE_HIDD_SEC_CTRL, BTA_SEC_AUTHENTICATE | BTA_SEC_ENCRYPT, HID_PSM_CONTROL)) { HIDD_TRACE_ERROR("Security Registration 1 failed"); return (HID_ERR_NO_RESOURCES); } if (!BTM_SimpleSetSecurityLevel(BTM_SEC_SERVICE_HIDD_INTR, BTM_SEC_NONE, HID_PSM_INTERRUPT)) { HIDD_TRACE_ERROR("Security Registration 5 failed"); return (HID_ERR_NO_RESOURCES); } /* Register with L2CAP */ st = hidd_conn_reg(); if (st != HID_SUCCESS) return st; Loading
system/stack/hid/hidd_conn.cc +14 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ #include "hidd_api.h" #include "hidd_int.h" #include "bta/include/bta_api.h" #include "osi/include/osi.h" #include "stack/btm/btm_sec.h" Loading Loading @@ -758,6 +759,19 @@ tHID_STATUS hidd_conn_reg(void) { hd_cb.l2cap_intr_cfg.flush_to_present = TRUE; hd_cb.l2cap_intr_cfg.flush_to = HID_DEV_FLUSH_TO; if (!BTM_SimpleSetSecurityLevel(BTM_SEC_SERVICE_HIDD_SEC_CTRL, BTA_SEC_AUTHENTICATE | BTA_SEC_ENCRYPT, HID_PSM_CONTROL)) { HIDD_TRACE_ERROR("Security Registration 1 failed"); return (HID_ERR_NO_RESOURCES); } if (!BTM_SimpleSetSecurityLevel(BTM_SEC_SERVICE_HIDD_INTR, BTM_SEC_NONE, HID_PSM_INTERRUPT)) { HIDD_TRACE_ERROR("Security Registration 5 failed"); return (HID_ERR_NO_RESOURCES); } if (!L2CA_Register(HID_PSM_CONTROL, (tL2CAP_APPL_INFO*)&dev_reg_info, false /* enable_snoop */, nullptr, hd_cb.l2cap_cfg.mtu)) { HIDD_TRACE_ERROR("HID Control (device) registration failed"); Loading