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

Commit da9bfe44 authored by Jack He's avatar Jack He Committed by Gerrit Code Review
Browse files

Merge "LeAclManager: Arm connectability on resume"

parents cbbb39bb 7c06f1c7
Loading
Loading
Loading
Loading
+2 −4
Original line number Original line 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()
  // connection canceled by LeAddressManager.OnPause(), will auto reconnect by LeAddressManager.OnResume()
  void on_le_connection_canceled_on_pause() {
  void on_le_connection_canceled_on_pause() {
    ASSERT_LOG(pause_connection, "Connection must be paused to ack the le address manager");
    ASSERT_LOG(pause_connection, "Connection must be paused to ack the le address manager");
    arm_on_resume_ = true;
    connectability_state_ = ConnectabilityState::DISARMED;
    connectability_state_ = ConnectabilityState::DISARMED;
    le_address_manager_->AckPause(this);
    le_address_manager_->AckPause(this);
  }
  }
@@ -464,12 +465,9 @@ struct le_impl : public bluetooth::hci::LeAddressManagerCallback {


    if (background_connections_.count(remote_address) == 1) {
    if (background_connections_.count(remote_address) == 1) {
      LOG_INFO("re-add device to connect list");
      LOG_INFO("re-add device to connect list");
      arm_on_resume_ = true;
      add_device_to_connect_list(remote_address);
      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) {
  void on_le_connection_update_complete(LeMetaEventView view) {