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

Commit 58626b1f authored by Hansong Zhang's avatar Hansong Zhang Committed by Automerger Merge Worker
Browse files

Flatten btm_sec_start_encryption am: 25dbf04f

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

Change-Id: I460c4318572d27f5a504064ac8d9da632ab8e961
parents 27c0f9d0 25dbf04f
Loading
Loading
Loading
Loading
+2 −14
Original line number Diff line number Diff line
@@ -66,7 +66,6 @@ tBTM_SEC_SERV_REC* btm_sec_find_first_serv(bool is_originator, uint16_t psm);

static bool btm_sec_start_get_name(tBTM_SEC_DEV_REC* p_dev_rec);
static void btm_sec_start_authentication(tBTM_SEC_DEV_REC* p_dev_rec);
static void btm_sec_start_encryption(tBTM_SEC_DEV_REC* p_dev_rec);
static void btm_sec_collision_timeout(void* data);
static void btm_restore_mode(void);
static void btm_sec_pairing_timeout(void* data);
@@ -4289,7 +4288,8 @@ tBTM_STATUS btm_sec_execute_procedure(tBTM_SEC_DEV_REC* p_dev_rec) {
      (p_dev_rec->hci_handle != HCI_INVALID_HANDLE)) {
    BTM_TRACE_EVENT("Security Manager: Start encryption");

    btm_sec_start_encryption(p_dev_rec);
    btsnd_hcic_set_conn_encrypt(p_dev_rec->hci_handle, true);
    p_dev_rec->sec_state = BTM_SEC_STATE_ENCRYPTING;
    return (BTM_CMD_STARTED);
  }

@@ -4344,18 +4344,6 @@ static void btm_sec_start_authentication(tBTM_SEC_DEV_REC* p_dev_rec) {
  btsnd_hcic_auth_request(p_dev_rec->hci_handle);
}

/*******************************************************************************
 *
 * Function         btm_sec_start_encryption
 *
 * Description      This function is called to start encryption
 *
 ******************************************************************************/
static void btm_sec_start_encryption(tBTM_SEC_DEV_REC* p_dev_rec) {
  btsnd_hcic_set_conn_encrypt(p_dev_rec->hci_handle, true);
  p_dev_rec->sec_state = BTM_SEC_STATE_ENCRYPTING;
}

/*******************************************************************************
 *
 * Function         btm_sec_find_first_serv