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

Commit ef14d1bf authored by Chris Manton's avatar Chris Manton Committed by Automerger Merge Worker
Browse files

Merge changes Iea75ea47,Ic4394c1c,I9938e1ff,Ibb90b945,I9c2bf7e2, ... into main...

Merge changes Iea75ea47,Ic4394c1c,I9938e1ff,Ibb90b945,I9c2bf7e2, ... into main am: 6e878356 am: 70c91304

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



Change-Id: Id435d9f2b794d9d5b7f92edf66af9a83965e28df
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 0a2a1f58 70c91304
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1848,7 +1848,7 @@ private:
        if (BTM_IsEncrypted(p_data->enc_cmpl.remote_bda, BT_TRANSPORT_LE)) {
          encryption_status = tBTM_STATUS::BTM_SUCCESS;
        } else {
          encryption_status = BTM_FAILED_ON_SECURITY;
          encryption_status = tBTM_STATUS::BTM_FAILED_ON_SECURITY;
        }
        OnLeEncryptionComplete(p_data->enc_cmpl.remote_bda, encryption_status);
      } break;
@@ -1916,7 +1916,7 @@ private:

    log::info("Encryption required for {}. Request result: 0x{:02x}", device->addr, result);

    if (result == BTM_ERR_KEY_MISSING) {
    if (result == tBTM_STATUS::BTM_ERR_KEY_MISSING) {
      log::error("Link key unknown for {}, disconnect profile", device->addr);
      BTA_GATTC_Close(device->conn_id);
    }
+1 −1
Original line number Diff line number Diff line
@@ -879,7 +879,7 @@ TEST_F(CsisClientTest, test_disconnect_when_link_key_is_gone) {

  ON_CALL(btm_interface, BTM_IsEncrypted(test_address, _)).WillByDefault(DoAll(Return(false)));
  ON_CALL(btm_interface, SetEncryption(test_address, _, _, _, _))
          .WillByDefault(Return(BTM_ERR_KEY_MISSING));
          .WillByDefault(Return(tBTM_STATUS::BTM_ERR_KEY_MISSING));

  EXPECT_CALL(gatt_interface, Close(1));

+1 −1
Original line number Diff line number Diff line
@@ -1875,7 +1875,7 @@ private:

    log::info("Encryption required for {}. Request result: 0x{:02x}", device->addr, result);

    if (result == BTM_ERR_KEY_MISSING) {
    if (result == tBTM_STATUS::BTM_ERR_KEY_MISSING) {
      log::error("Link key unknown for {}, disconnect profile", device->addr);
      BTA_GATTC_Close(device->conn_id);
    }
+1 −1
Original line number Diff line number Diff line
@@ -1275,7 +1275,7 @@ TEST_F(HasClientTest, test_disconnect_when_link_key_is_gone) {

  ON_CALL(btm_interface, BTM_IsEncrypted(test_address, _)).WillByDefault(DoAll(Return(false)));
  ON_CALL(btm_interface, SetEncryption(test_address, _, _, _, _))
          .WillByDefault(Return(BTM_ERR_KEY_MISSING));
          .WillByDefault(Return(tBTM_STATUS::BTM_ERR_KEY_MISSING));

  auto test_conn_id = GetTestConnId(test_address);
  EXPECT_CALL(gatt_interface, Close(test_conn_id)).Times(1);
+3 −2
Original line number Diff line number Diff line
@@ -1011,7 +1011,7 @@ void bta_hh_security_cmpl(tBTA_HH_DEV_CB* p_cb, const tBTA_HH_DATA* /* p_buf */)
      log::verbose("Starting service discovery");
      bta_hh_le_pri_service_discovery(p_cb);
    }
  } else if (p_cb->btm_status == BTM_ERR_KEY_MISSING) {
  } else if (p_cb->btm_status == tBTM_STATUS::BTM_ERR_KEY_MISSING) {
    log::error("Received encryption failed status:{} btm_status:{}",
               bta_hh_status_text(p_cb->status), btm_status_text(p_cb->btm_status));
    bta_hh_le_api_disc_act(p_cb);
@@ -1019,7 +1019,8 @@ void bta_hh_security_cmpl(tBTA_HH_DEV_CB* p_cb, const tBTA_HH_DATA* /* p_buf */)
    log::error("Encryption failed status:{} btm_status:{}", bta_hh_status_text(p_cb->status),
               btm_status_text(p_cb->btm_status));
    if (!(p_cb->status == BTA_HH_ERR_SEC &&
          (p_cb->btm_status == BTM_ERR_PROCESSING || p_cb->btm_status == BTM_FAILED_ON_SECURITY ||
          (p_cb->btm_status == tBTM_STATUS::BTM_ERR_PROCESSING ||
           p_cb->btm_status == tBTM_STATUS::BTM_FAILED_ON_SECURITY ||
           p_cb->btm_status == BTM_WRONG_MODE))) {
      bta_hh_le_api_disc_act(p_cb);
    }
Loading