Loading android/app/src/com/android/bluetooth/btservice/AdapterService.java +2 −0 Original line number Diff line number Diff line Loading @@ -4817,6 +4817,8 @@ public class AdapterService extends Service { return BluetoothStatusCodes.ERROR_DISCONNECT_REASON_BAD_PARAMETERS; case /*HCI_ERR_PEER_USER*/ 0x13: return BluetoothStatusCodes.ERROR_DISCONNECT_REASON_REMOTE_REQUEST; case /*HCI_ERR_REMOTE_POWER_OFF*/ 0x15: return BluetoothStatusCodes.ERROR_DISCONNECT_REASON_REMOTE_REQUEST; case /*HCI_ERR_CONN_CAUSE_LOCAL_HOST*/ 0x16: return BluetoothStatusCodes.ERROR_DISCONNECT_REASON_LOCAL_REQUEST; case /*HCI_ERR_UNSUPPORTED_REM_FEATURE*/ 0x1A: Loading system/stack/btm/btm_sec.cc +1 −1 Original line number Diff line number Diff line Loading @@ -3750,7 +3750,7 @@ tBTM_STATUS btm_sec_disconnect(uint16_t handle, tHCI_STATUS reason, void btm_sec_disconnected(uint16_t handle, tHCI_REASON reason, std::string comment) { if ((reason != HCI_ERR_CONN_CAUSE_LOCAL_HOST) && (reason != HCI_ERR_PEER_USER)) { (reason != HCI_ERR_PEER_USER) && (reason != HCI_ERR_REMOTE_POWER_OFF)) { LOG_WARN("Got uncommon disconnection reason:%s handle:0x%04x comment:%s", hci_error_code_text(reason).c_str(), handle, comment.c_str()); } Loading system/stack/include/gatt_api.h +3 −0 Original line number Diff line number Diff line Loading @@ -213,6 +213,8 @@ typedef enum : uint16_t { GATT_CONN_FAILED_ESTABLISHMENT = HCI_ERR_CONN_FAILED_ESTABLISHMENT, GATT_CONN_TERMINATED_POWER_OFF = HCI_ERR_REMOTE_POWER_OFF, BTA_GATT_CONN_NONE = 0x0101, /* 0x0101 no connection to cancel */ } tGATT_DISCONN_REASON; Loading @@ -232,6 +234,7 @@ inline std::string gatt_disconnection_reason_text( CASE_RETURN_TEXT(GATT_CONN_LMP_TIMEOUT); CASE_RETURN_TEXT(GATT_CONN_FAILED_ESTABLISHMENT); CASE_RETURN_TEXT(BTA_GATT_CONN_NONE); CASE_RETURN_TEXT(GATT_CONN_TERMINATED_POWER_OFF); default: return base::StringPrintf("UNKNOWN[%hu]", reason); } Loading Loading
android/app/src/com/android/bluetooth/btservice/AdapterService.java +2 −0 Original line number Diff line number Diff line Loading @@ -4817,6 +4817,8 @@ public class AdapterService extends Service { return BluetoothStatusCodes.ERROR_DISCONNECT_REASON_BAD_PARAMETERS; case /*HCI_ERR_PEER_USER*/ 0x13: return BluetoothStatusCodes.ERROR_DISCONNECT_REASON_REMOTE_REQUEST; case /*HCI_ERR_REMOTE_POWER_OFF*/ 0x15: return BluetoothStatusCodes.ERROR_DISCONNECT_REASON_REMOTE_REQUEST; case /*HCI_ERR_CONN_CAUSE_LOCAL_HOST*/ 0x16: return BluetoothStatusCodes.ERROR_DISCONNECT_REASON_LOCAL_REQUEST; case /*HCI_ERR_UNSUPPORTED_REM_FEATURE*/ 0x1A: Loading
system/stack/btm/btm_sec.cc +1 −1 Original line number Diff line number Diff line Loading @@ -3750,7 +3750,7 @@ tBTM_STATUS btm_sec_disconnect(uint16_t handle, tHCI_STATUS reason, void btm_sec_disconnected(uint16_t handle, tHCI_REASON reason, std::string comment) { if ((reason != HCI_ERR_CONN_CAUSE_LOCAL_HOST) && (reason != HCI_ERR_PEER_USER)) { (reason != HCI_ERR_PEER_USER) && (reason != HCI_ERR_REMOTE_POWER_OFF)) { LOG_WARN("Got uncommon disconnection reason:%s handle:0x%04x comment:%s", hci_error_code_text(reason).c_str(), handle, comment.c_str()); } Loading
system/stack/include/gatt_api.h +3 −0 Original line number Diff line number Diff line Loading @@ -213,6 +213,8 @@ typedef enum : uint16_t { GATT_CONN_FAILED_ESTABLISHMENT = HCI_ERR_CONN_FAILED_ESTABLISHMENT, GATT_CONN_TERMINATED_POWER_OFF = HCI_ERR_REMOTE_POWER_OFF, BTA_GATT_CONN_NONE = 0x0101, /* 0x0101 no connection to cancel */ } tGATT_DISCONN_REASON; Loading @@ -232,6 +234,7 @@ inline std::string gatt_disconnection_reason_text( CASE_RETURN_TEXT(GATT_CONN_LMP_TIMEOUT); CASE_RETURN_TEXT(GATT_CONN_FAILED_ESTABLISHMENT); CASE_RETURN_TEXT(BTA_GATT_CONN_NONE); CASE_RETURN_TEXT(GATT_CONN_TERMINATED_POWER_OFF); default: return base::StringPrintf("UNKNOWN[%hu]", reason); } Loading