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

Commit 62464a64 authored by Jakub Pawłowski's avatar Jakub Pawłowski Committed by Gerrit Code Review
Browse files

Merge "leaudio: Fix reconnection"

parents e8494449 f3829a2c
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -1108,13 +1108,12 @@ class LeAudioClientImpl : public LeAudioClient {
    if (!leAudioDevice) {
      leAudioDevices_.Add(address, DeviceConnectState::CONNECTING_BY_USER);
    } else {
      if (leAudioDevice->GetConnectionState() !=
          DeviceConnectState::DISCONNECTED) {
        LOG_ERROR(
            "Device %s is in invalid state: %s",
      auto current_connect_state = leAudioDevice->GetConnectionState();
      if ((current_connect_state == DeviceConnectState::CONNECTED) ||
          (current_connect_state == DeviceConnectState::CONNECTING_BY_USER)) {
        LOG_ERROR("Device %s is in invalid state: %s",
                  leAudioDevice->address_.ToString().c_str(),
            bluetooth::common::ToString(leAudioDevice->GetConnectionState())
                .c_str());
                  bluetooth::common::ToString(current_connect_state).c_str());

        return;
      }