Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b0345e0e authored by Jakub Pawłowski's avatar Jakub Pawłowski Committed by Automerger Merge Worker
Browse files

Merge "Bluetooth: Add handling TERMINATED_POWER_OFF error code" am: 5d49607a...

Merge "Bluetooth: Add handling TERMINATED_POWER_OFF error code" am: 5d49607a am: 8f7ceee2 am: 7b2b899c

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2365888



Change-Id: I0f0ab79bb4b0efa0b89cee47c18613e4a147e19e
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents eb2ebada 7b2b899c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -4821,6 +4821,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:
+1 −1
Original line number Diff line number Diff line
@@ -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());
  }
+3 −0
Original line number Diff line number Diff line
@@ -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;
@@ -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);
  }