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

Commit f6c05b7d authored by Antoine Soulier's avatar Antoine Soulier Committed by Gerrit Code Review
Browse files

Merge "LE Audio Software offload: Handle death of client" into main

parents 0f715415 39e81008
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -97,6 +97,10 @@ class Hal {
        std::vector<uint8_t>(data, data + len));
  }

  static void ClientDied(void* instance) {
    static_cast<Hal*>(instance)->ClientDied();
  }

 private:
  int getFdFromDevPath() {
    int fd = open(mDevPath.c_str(), O_RDWR);
@@ -322,6 +326,11 @@ class Hal {
    return true;
  }

  void ClientDied() {
    ALOGE("Bluetooth client has died");
    Close();
  }

  std::unique_ptr<struct hal_callbacks> mCallbacks;
  std::string mDevPath;
  int mFd{-1};
@@ -354,6 +363,7 @@ struct hal_interface hal_new() {
      .send_acl = &Hal::SendAcl,
      .send_sco = &Hal::SendSco,
      .send_iso = &Hal::SendIso,
      .client_died = &Hal::ClientDied,
  };
}
}