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

Commit e9063768 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Merge cherrypicks of [12620612, 12620613, 12620936, 12620457, 12616684,...

Merge cherrypicks of [12620612, 12620613, 12620936, 12620457, 12616684, 12621005, 12620883, 12620884, 12620846, 12620847, 12620869, 12620848, 12620849, 12620961, 12620962, 12620827, 12620614, 12620197, 12620885, 12620198, 12621039, 12621040, 12621041, 12620937, 12620615, 12620886] into rvc-release

Change-Id: Ia275fa1227a228eef939195673d5cba10c53a608
parents 393daa33 4088579f
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -3804,6 +3804,16 @@ static uint8_t bta_dm_ble_smp_cback(tBTM_LE_EVT event, const RawAddress& bda,

      break;

    case BTM_LE_CONSENT_REQ_EVT:
      sec_event.ble_req.bd_addr = bda;
      p_name = BTM_SecReadDevName(bda);
      if (p_name != NULL)
        strlcpy((char*)sec_event.ble_req.bd_name, p_name, BD_NAME_LEN);
      else
        sec_event.ble_req.bd_name[0] = 0;
      bta_dm_cb.p_sec_cback(BTA_DM_BLE_CONSENT_REQ_EVT, &sec_event);
      break;

    case BTM_LE_SEC_REQUEST_EVT:
      sec_event.ble_req.bd_addr = bda;
      p_name = BTM_SecReadDevName(bda);
+1 −0
Original line number Diff line number Diff line
@@ -380,6 +380,7 @@ typedef uint8_t tBTA_SIG_STRENGTH_MASK;
                                    */
#define BTA_DM_ENER_INFO_READ 28 /* Energy info read */
#define BTA_DM_BLE_SC_OOB_REQ_EVT 29 /* SMP SC OOB request event */
#define BTA_DM_BLE_CONSENT_REQ_EVT 30 /* SMP consent request event */
typedef uint8_t tBTA_DM_SEC_EVT;

/* Structure associated with BTA_DM_ENABLE_EVT */
+12 −0
Original line number Diff line number Diff line
@@ -132,6 +132,18 @@ bool is_niap_mode(void);
 ******************************************************************************/
int get_niap_config_compare_result(void);

/*******************************************************************************
 *
 * Function         is_atv_device
 *
 * Description      Returns true if the local device is an Android TV
 *                  device, false if it is not.
 *
 * Returns          bool
 *
 ******************************************************************************/
bool is_atv_device(void);

/*******************************************************************************
 *
 * Function         btif_get_adapter_properties
+1 −1
Original line number Diff line number Diff line
@@ -102,7 +102,7 @@ void btif_dm_get_ble_local_keys(tBTA_DM_BLE_LOCAL_KEY_MASK* p_key_mask,
                                tBTA_BLE_LOCAL_ID_KEYS* p_id_keys);
void btif_dm_save_ble_bonding_keys(RawAddress& bd_addr);
void btif_dm_remove_ble_bonding_keys(void);
void btif_dm_ble_sec_req_evt(tBTA_DM_BLE_SEC_REQ* p_ble_req);
void btif_dm_ble_sec_req_evt(tBTA_DM_BLE_SEC_REQ* p_ble_req, bool is_consent);

void btif_dm_update_ble_remote_properties(const RawAddress& bd_addr,
                                          BD_NAME bd_name,
+5 −1
Original line number Diff line number Diff line
@@ -88,6 +88,7 @@ bool restricted_mode = false;
bool niap_mode = false;
const int CONFIG_COMPARE_ALL_PASS = 0b11;
int niap_config_compare_result = CONFIG_COMPARE_ALL_PASS;
bool is_local_device_atv = false;

/*******************************************************************************
 *  Externs
@@ -140,7 +141,7 @@ static bool is_profile(const char* p1, const char* p2) {
 ****************************************************************************/

static int init(bt_callbacks_t* callbacks, bool start_restricted,
                bool is_niap_mode, int config_compare_result) {
                bool is_niap_mode, int config_compare_result, bool is_atv) {
  LOG_INFO(LOG_TAG,
           "%s: start restricted = %d ; niap = %d, config compare result = %d",
           __func__, start_restricted, is_niap_mode, config_compare_result);
@@ -161,6 +162,7 @@ static int init(bt_callbacks_t* callbacks, bool start_restricted,
  restricted_mode = start_restricted;
  niap_mode = is_niap_mode;
  niap_config_compare_result = config_compare_result;
  is_local_device_atv = is_atv;

  stack_manager_get_interface()->init_stack();
  btif_debug_init();
@@ -191,6 +193,8 @@ int get_niap_config_compare_result() {
  return niap_mode ? niap_config_compare_result : CONFIG_COMPARE_ALL_PASS;
}

bool is_atv_device() { return is_local_device_atv; }

static int get_adapter_properties(void) {
  /* sanity check */
  if (!interface_ready()) return BT_STATUS_NOT_READY;
Loading