Loading system/binder/android/bluetooth/IBluetoothConnectionCallback.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -23,5 +23,5 @@ import android.bluetooth.BluetoothDevice; */ oneway interface IBluetoothConnectionCallback { void onDeviceConnected(in BluetoothDevice device); void onDeviceDisconnected(in BluetoothDevice device); void onDeviceDisconnected(in BluetoothDevice device, in int hciReason); } system/btif/include/btif_common.h +1 −1 Original line number Diff line number Diff line Loading @@ -210,7 +210,7 @@ void invoke_ssp_request_cb(RawAddress bd_addr, bt_bdname_t bd_name, void invoke_bond_state_changed_cb(bt_status_t status, RawAddress bd_addr, bt_bond_state_t state); void invoke_acl_state_changed_cb(bt_status_t status, RawAddress bd_addr, bt_acl_state_t state); bt_acl_state_t state, bt_hci_error_code_t hci_reason); void invoke_thread_evt_cb(bt_cb_thread_evt event); void invoke_le_test_mode_cb(bt_status_t status, uint16_t count); void invoke_energy_info_cb(bt_activity_energy_info energy_info, Loading system/btif/src/bluetooth.cc +5 −4 Original line number Diff line number Diff line Loading @@ -725,15 +725,16 @@ void invoke_bond_state_changed_cb(bt_status_t status, RawAddress bd_addr, } void invoke_acl_state_changed_cb(bt_status_t status, RawAddress bd_addr, bt_acl_state_t state) { bt_acl_state_t state, bt_hci_error_code_t hci_reason) { do_in_jni_thread( FROM_HERE, base::BindOnce( [](bt_status_t status, RawAddress bd_addr, bt_acl_state_t state) { [](bt_status_t status, RawAddress bd_addr, bt_acl_state_t state, bt_hci_error_code_t hci_reason) { HAL_CBACK(bt_hal_cbacks, acl_state_changed_cb, status, &bd_addr, state); state, hci_reason); }, status, bd_addr, state)); status, bd_addr, state, hci_reason)); } void invoke_thread_evt_cb(bt_cb_thread_evt event) { Loading system/btif/src/btif_dm.cc +3 −2 Original line number Diff line number Diff line Loading @@ -1532,7 +1532,7 @@ static void btif_dm_upstreams_evt(uint16_t event, char* p_param) { btif_update_remote_version_property(&bd_addr); invoke_acl_state_changed_cb(BT_STATUS_SUCCESS, bd_addr, BT_ACL_STATE_CONNECTED); BT_ACL_STATE_CONNECTED, HCI_SUCCESS); break; case BTA_DM_LINK_DOWN_EVT: Loading @@ -1543,7 +1543,8 @@ static void btif_dm_upstreams_evt(uint16_t event, char* p_param) { BTIF_TRACE_DEBUG( "BTA_DM_LINK_DOWN_EVT. Sending BT_ACL_STATE_DISCONNECTED"); invoke_acl_state_changed_cb(BT_STATUS_SUCCESS, bd_addr, BT_ACL_STATE_DISCONNECTED); BT_ACL_STATE_DISCONNECTED, static_cast<bt_hci_error_code_t>(btm_get_acl_disc_reason_code())); break; case BTA_DM_BLE_KEY_EVT: Loading system/include/hardware/bluetooth.h +6 −1 Original line number Diff line number Diff line Loading @@ -135,6 +135,10 @@ inline std::string bt_status_text(const bt_status_t& status) { } } /** Bluetooth HCI Error Codes */ /** Corresponding to [Vol 2] Part D, "Error Codes" of Core_v5.1 specs */ typedef uint8_t bt_hci_error_code_t; /** Bluetooth PinKey Code */ typedef struct { uint8_t pin[16]; } __attribute__((packed)) bt_pin_code_t; Loading Loading @@ -423,7 +427,8 @@ typedef void (*bond_state_changed_callback)(bt_status_t status, /** Bluetooth ACL connection state changed callback */ typedef void (*acl_state_changed_callback)(bt_status_t status, RawAddress* remote_bd_addr, bt_acl_state_t state); bt_acl_state_t state, bt_hci_error_code_t hci_reason); /** Bluetooth link quality report callback */ typedef void (*link_quality_report_callback)( Loading Loading
system/binder/android/bluetooth/IBluetoothConnectionCallback.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -23,5 +23,5 @@ import android.bluetooth.BluetoothDevice; */ oneway interface IBluetoothConnectionCallback { void onDeviceConnected(in BluetoothDevice device); void onDeviceDisconnected(in BluetoothDevice device); void onDeviceDisconnected(in BluetoothDevice device, in int hciReason); }
system/btif/include/btif_common.h +1 −1 Original line number Diff line number Diff line Loading @@ -210,7 +210,7 @@ void invoke_ssp_request_cb(RawAddress bd_addr, bt_bdname_t bd_name, void invoke_bond_state_changed_cb(bt_status_t status, RawAddress bd_addr, bt_bond_state_t state); void invoke_acl_state_changed_cb(bt_status_t status, RawAddress bd_addr, bt_acl_state_t state); bt_acl_state_t state, bt_hci_error_code_t hci_reason); void invoke_thread_evt_cb(bt_cb_thread_evt event); void invoke_le_test_mode_cb(bt_status_t status, uint16_t count); void invoke_energy_info_cb(bt_activity_energy_info energy_info, Loading
system/btif/src/bluetooth.cc +5 −4 Original line number Diff line number Diff line Loading @@ -725,15 +725,16 @@ void invoke_bond_state_changed_cb(bt_status_t status, RawAddress bd_addr, } void invoke_acl_state_changed_cb(bt_status_t status, RawAddress bd_addr, bt_acl_state_t state) { bt_acl_state_t state, bt_hci_error_code_t hci_reason) { do_in_jni_thread( FROM_HERE, base::BindOnce( [](bt_status_t status, RawAddress bd_addr, bt_acl_state_t state) { [](bt_status_t status, RawAddress bd_addr, bt_acl_state_t state, bt_hci_error_code_t hci_reason) { HAL_CBACK(bt_hal_cbacks, acl_state_changed_cb, status, &bd_addr, state); state, hci_reason); }, status, bd_addr, state)); status, bd_addr, state, hci_reason)); } void invoke_thread_evt_cb(bt_cb_thread_evt event) { Loading
system/btif/src/btif_dm.cc +3 −2 Original line number Diff line number Diff line Loading @@ -1532,7 +1532,7 @@ static void btif_dm_upstreams_evt(uint16_t event, char* p_param) { btif_update_remote_version_property(&bd_addr); invoke_acl_state_changed_cb(BT_STATUS_SUCCESS, bd_addr, BT_ACL_STATE_CONNECTED); BT_ACL_STATE_CONNECTED, HCI_SUCCESS); break; case BTA_DM_LINK_DOWN_EVT: Loading @@ -1543,7 +1543,8 @@ static void btif_dm_upstreams_evt(uint16_t event, char* p_param) { BTIF_TRACE_DEBUG( "BTA_DM_LINK_DOWN_EVT. Sending BT_ACL_STATE_DISCONNECTED"); invoke_acl_state_changed_cb(BT_STATUS_SUCCESS, bd_addr, BT_ACL_STATE_DISCONNECTED); BT_ACL_STATE_DISCONNECTED, static_cast<bt_hci_error_code_t>(btm_get_acl_disc_reason_code())); break; case BTA_DM_BLE_KEY_EVT: Loading
system/include/hardware/bluetooth.h +6 −1 Original line number Diff line number Diff line Loading @@ -135,6 +135,10 @@ inline std::string bt_status_text(const bt_status_t& status) { } } /** Bluetooth HCI Error Codes */ /** Corresponding to [Vol 2] Part D, "Error Codes" of Core_v5.1 specs */ typedef uint8_t bt_hci_error_code_t; /** Bluetooth PinKey Code */ typedef struct { uint8_t pin[16]; } __attribute__((packed)) bt_pin_code_t; Loading Loading @@ -423,7 +427,8 @@ typedef void (*bond_state_changed_callback)(bt_status_t status, /** Bluetooth ACL connection state changed callback */ typedef void (*acl_state_changed_callback)(bt_status_t status, RawAddress* remote_bd_addr, bt_acl_state_t state); bt_acl_state_t state, bt_hci_error_code_t hci_reason); /** Bluetooth link quality report callback */ typedef void (*link_quality_report_callback)( Loading