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

Commit b56495ce authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "legacy: Bool-ify tBTA_PAN_STATUS" am: 138e79ae

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1853869

Change-Id: I7b38868b0f1a4258c26c12ba0e062539e1862c4d
parents 45f5b753 138e79ae
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -33,10 +33,9 @@
/*****************************************************************************
 *  Constants and data types
 ****************************************************************************/
#define BTA_PAN_SUCCESS 0
#define BTA_PAN_FAIL 1

typedef uint8_t tBTA_PAN_STATUS;
constexpr bool BTA_PAN_SUCCESS = true;
constexpr bool BTA_PAN_FAIL = false;
typedef bool tBTA_PAN_STATUS;

/* PAN Callback events */
#define BTA_PAN_ENABLE_EVT 0   /* PAN service is enabled. */
+3 −4
Original line number Diff line number Diff line
@@ -568,9 +568,8 @@ static void bta_pan_callback_transfer(uint16_t event, char* p_param) {
      break;
    case BTA_PAN_SET_ROLE_EVT: {
      int btpan_role = bta_role_to_btpan(p_data->set_role.role);
      bt_status_t status = p_data->set_role.status == BTA_PAN_SUCCESS
                               ? BT_STATUS_SUCCESS
                               : BT_STATUS_FAIL;
      bt_status_t status =
          (p_data->set_role.status) ? BT_STATUS_SUCCESS : BT_STATUS_FAIL;
      btpan_control_state_t state =
          btpan_role == 0 ? BTPAN_STATE_DISABLED : BTPAN_STATE_ENABLED;
      callback.control_state_cb(state, btpan_role, status, TAP_IF_NAME);
@@ -602,7 +601,7 @@ static void bta_pan_callback_transfer(uint16_t event, char* p_param) {

      LOG_VERBOSE("%s pan connection open status: %d", __func__,
                  p_data->open.status);
      if (p_data->open.status == BTA_PAN_SUCCESS) {
      if (p_data->open.status) {
        state = BTPAN_STATE_CONNECTED;
        status = BT_STATUS_SUCCESS;
        btpan_open_conn(conn, p_data);