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

Commit 60fd1237 authored by Myles Watson's avatar Myles Watson Committed by Jack He
Browse files

LeAclManager: Arm connectability on resume

Bug: 234496601
Bug: 232258524
Test: gd/cert/run LeAclManagerTest
Tag: #gd-refactor
Merged-In: I2cdaa240bb40b2241a7ee8ec1f5651fe0cc734f6
Change-Id: I2cdaa240bb40b2241a7ee8ec1f5651fe0cc734f6
(cherry picked from commit 7c06f1c7)
parent ad76e928
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -265,6 +265,7 @@ struct le_impl : public bluetooth::hci::LeAddressManagerCallback {
  // connection canceled by LeAddressManager.OnPause(), will auto reconnect by LeAddressManager.OnResume()
  void on_le_connection_canceled_on_pause() {
    ASSERT_LOG(pause_connection, "Connection must be paused to ack the le address manager");
    arm_on_resume_ = true;
    connectability_state_ = ConnectabilityState::DISARMED;
    le_address_manager_->AckPause(this);
  }
@@ -464,12 +465,9 @@ struct le_impl : public bluetooth::hci::LeAddressManagerCallback {

    if (background_connections_.count(remote_address) == 1) {
      LOG_INFO("re-add device to connect list");
      arm_on_resume_ = true;
      add_device_to_connect_list(remote_address);
    }
    if (!connect_list.empty() && connectability_state_ == ConnectabilityState::DISARMED) {
      LOG_INFO("connect_list is not empty, send a new connection request");
      arm_connectability();
    }
  }

  void on_le_connection_update_complete(LeMetaEventView view) {