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

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

Merge cherrypicks of [12425228, 12425136, 12425209, 12425138] into rvc-release

Change-Id: I94ba19769afd597406f0916c01bdb601879b0203
parents 482f94c5 0a034a7e
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -132,18 +132,6 @@ 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 −5
Original line number Diff line number Diff line
@@ -88,7 +88,6 @@ 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
@@ -141,7 +140,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_atv) {
                bool is_niap_mode, int config_compare_result) {
  LOG_INFO(LOG_TAG,
           "%s: start restricted = %d ; niap = %d, config compare result = %d",
           __func__, start_restricted, is_niap_mode, config_compare_result);
@@ -162,7 +161,6 @@ 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();
@@ -193,8 +191,6 @@ 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;
+1 −2
Original line number Diff line number Diff line
@@ -473,10 +473,9 @@ typedef struct {
   * The |is_niap_mode| flag inits the adapter in NIAP mode.
   * The |config_compare_result| flag show the config checksum check result if
   * is in NIAP mode.
   * The |is_atv| flag indicates whether the local device is an Android TV
   */
  int (*init)(bt_callbacks_t* callbacks, bool guest_mode, bool is_niap_mode,
              int config_compare_result, bool is_atv);
              int config_compare_result);

  /** Enable Bluetooth. */
  int (*enable)();
+1 −1
Original line number Diff line number Diff line
@@ -254,7 +254,7 @@ class BluetoothInterfaceImpl : public BluetoothInterface {

    // Initialize the Bluetooth interface. Set up the adapter (Bluetooth DM) API
    // callbacks.
    status = hal_iface_->init(&bt_callbacks, false, false, 0, false);
    status = hal_iface_->init(&bt_callbacks, false, false, 0);
    if (status != BT_STATUS_SUCCESS) {
      LOG(ERROR) << "Failed to initialize Bluetooth stack";
      return false;
+4 −7
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@
#include <cutils/log.h>
#include <log/log.h>
#include <string.h>
#include "btif_api.h"
#include "btif_common.h"
#include "btif_storage.h"
#include "device/include/interop.h"
@@ -1302,9 +1301,8 @@ void smp_decide_association_model(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) {
        smp_int_data.status = SMP_PAIR_AUTH_FAIL;
        int_evt = SMP_AUTH_CMPL_EVT;
      } else {
        if (!is_atv_device() &&
            (p_cb->local_io_capability == SMP_IO_CAP_IO ||
             p_cb->local_io_capability == SMP_IO_CAP_KBDISP)) {
        if (p_cb->local_io_capability != SMP_IO_CAP_NONE &&
            p_cb->local_io_capability != SMP_IO_CAP_IN) {
          /* display consent dialog if this device has a display */
          SMP_TRACE_DEBUG("ENCRYPTION_ONLY showing Consent Dialog");
          p_cb->cb_evt = SMP_CONSENT_REQ_EVT;
@@ -1658,9 +1656,8 @@ void smp_process_peer_nonce(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) {
      }

      if (p_cb->selected_association_model == SMP_MODEL_SEC_CONN_JUSTWORKS) {
        if (!is_atv_device() &&
            (p_cb->local_io_capability == SMP_IO_CAP_IO ||
             p_cb->local_io_capability == SMP_IO_CAP_KBDISP)) {
        if (p_cb->local_io_capability != SMP_IO_CAP_NONE &&
            p_cb->local_io_capability != SMP_IO_CAP_IN) {
          /* display consent dialog */
          SMP_TRACE_DEBUG("JUST WORKS showing Consent Dialog");
          p_cb->cb_evt = SMP_CONSENT_REQ_EVT;
Loading